home *** CD-ROM | disk | FTP | other *** search
/ ShareWare OnLine 2 / ShareWare OnLine Volume 2 (CMS Software)(1993).iso / prog / fpclib36.zip / MANUAL.DOC < prev    next >
Text File  |  1993-03-25  |  238KB  |  6,204 lines

  1.  
  2.  
  3.  
  4.  
  5.                  +--------------------------------+
  6.                  |                                |
  7.                  |  +--------------------------+  |
  8.                  |  |                          |  |
  9.                  |  |    FlashPac C Library    |  |
  10.                  |  |                          |  |
  11.                  |  |     Reference Guide      |  |
  12.                  |  |                          |  |
  13.                  |  |          V3.61           |  |
  14.                  |  |                          │  |
  15.                  |  +--------------------------+  |
  16.                  |                                |
  17.                  +--------------------------------+
  18.  
  19.  
  20.  
  21.  
  22.  
  23.                             SimpleSoft
  24.                           1209 Poplar St
  25.                        La Crescent, MN 55947
  26.  
  27.  
  28.                  Technical Support: (507) 895-8237
  29.                      CompuServ Id: 70253,1270
  30.  
  31.  
  32.  
  33.         _______
  34.    ____|__     |               (R)
  35. --|       |    |-------------------
  36.   |   ____|__  |  Association of
  37.   |  |       |_|  Shareware
  38.   |__|   o   |    Professionals
  39. -----|   |   |---------------------
  40.      |___|___|    MEMBER
  41.  
  42.  
  43.  
  44. OMBUDSMAN STATEMENT
  45. -------------------
  46. The ASP Board has set up an office of Ombudsman and appointed an ASP 
  47. member as Ombudsman.  The Ombudsman's sole role is to mediate
  48. disputes between ASP members and their customers. The Ombudsman 
  49. reports to the Board situa tions where he/she feels Board action or 
  50. knowledge is appropriate.
  51.  
  52. "Kevin Dahl is a member of the Association of Shareware Professionals 
  53. (ASP). ASP wants to make sure that the shareware principle works for 
  54. you. If you are unable to resolve a shareware-related problem with an 
  55. ASP member by contacting the member directly, ASP may be able to 
  56. help. The ASP Ombudsman can help you resolve a dispute or problem 
  57. with an ASP member, but does not provide technical support for 
  58. members' products. Please write to the ASP Ombudsman at 545 Grover 
  59. Road, Muskegon, MI 49442 or send a CompuServe message via CompuServe 
  60. Mail to ASP Ombudsman 70007,3536."
  61.  
  62.  
  63. Technical Support
  64. -----------------
  65. To contact SimpleSoft for information about dealer pricing volume 
  66. discounts, site licensing, the status of shipment of the product, the 
  67. latest version number, or for technical information, call:
  68.  
  69.    SimpleSoft
  70.    (507) 895-8237
  71.    Between 5:30pm and 9:00pm CST, weekdays.
  72.  
  73. or write:
  74.    Kevin Dahl
  75.    SimpleSoft
  76.    1209 Poplar St
  77.    La Crescent, MN 55947
  78.  
  79. or use CIS Mail,
  80.    CompuServe ID number: 70253,1270
  81.  
  82. You may call for technical support between the hours of 7:30am to 
  83. 9:30pm CST.  During the hours 8:00am to 5:30pm you will either get my 
  84. wife or an answering machine.  If you call and leave a message I will 
  85. return your call as soon as I can.  Generally, the best hours to call 
  86. are from 5:30pm to 9:30pm weekdays.  Weekends are a tossup.
  87.  
  88. Turbo C is a trademark of Borland International.  Microsoft and 
  89. MS-DOS are regis tered trademarks of Microsoft Corporation.  IBM is a 
  90. registered trademark and PC/XT, PC/AT, PS/2,  PC-DOS, OS/2 and PM are 
  91. trademarks of International Business Machines Corporation.
  92.  
  93.                                Chapter 1
  94.                              Introduction
  95.  
  96.                   +--------------------------------+
  97.                   |                                |
  98.                   | Welcome to version 3.61 of the |
  99.                   |        FlashPac Library.       |
  100.                   |                                |
  101.                   | Thank-you for supporting the   |
  102.                   |        FlashPac Library        |
  103.                   |                                |
  104.                   +--------------------------------+
  105.  
  106. Getting Started
  107. ---------------
  108. This is a reference manual for the FlashPac C Video library. This 
  109. implementation is for use with Microsoft C or Turbo C in MS-DOS.  A 
  110. working knowledge of C and personal computers is assumed.
  111.  
  112. The FlashPac C Library written in assembler provides over 40 Direct
  113. Video routines to save and restore screen data, frame windows, display
  114. strings, change attributes, edit data fields plus more.  Bios Video
  115. support for cursor control, hardware detection, font selection, font
  116. definition, etc.  Several mouse support functions including get/set
  117. mouse cursor position, set mouse x,y range and also a mouse interrupt
  118. handler for queuing mouse events.  Bios and DOS keyboard support for
  119. total keyboard control.  Dos support functions to get/ set file time
  120. and date, get/set clock time and date, get/set dta, critical interrupt
  121. handler plus more.. In addition    the FPCWin library included is a set
  122. of C and assembler functions that implement the basic elements for a
  123. programmer to create a message based application.
  124.  
  125. The functions in chapter 2 are referred to as FPCWin functions.  The
  126. functions in FPCWin contain the core functions necessary to implement
  127. a message based program.  The current implementation will relieve the 
  128. software engineer from writing the functions required to obtain 
  129. information about the next system event, i.e. mouse and keyboard 
  130. events.  Mouse and keyboard events are automatically queued into the 
  131. system queue and may be retrieved anytime with a call to WinGetMsg.  
  132. WinGetMsg allows the developer to retrieve the messages in the exact
  133. same order as they were placed into the queue or retrieve the next 
  134. message of a specified type, such as the next mouse event.
  135.  
  136.  
  137. Installation
  138. ------------
  139. The FlashPac C library consists of two files:
  140.    FPCLIB.H
  141.    FPCLIB.LIB
  142.  
  143. Place the header file "FPCLIB.H" in the subdirectory that contains 
  144. the header files for your compiler and  place "FPCLIB.LIB" in the 
  145. subdirectory that where the library files are in.  You are now ready 
  146. to use the FlashPac C library.
  147.  
  148. Compiling and Linking a test program
  149.  
  150. To compile and link "DEMO.C" and "GETKEY.C" modules use the 
  151. instructions for the appropriate compiler.
  152.  
  153.  
  154. Turbo C
  155. -------
  156.   Integrated environment:
  157.      1.   Select the large memory model under the Options,
  158.           compiler menu.
  159.      2.   Create a project file with the following three lines:
  160.              demo    (demo.c)
  161.              getkey  (getkey.c)
  162.              fpclib.lib
  163.      3.   Select the project file under the compile menu option select
  164.           build all to create an executable file called demo.exe
  165.  
  166.   Command Line:
  167.      C>tcc -IC:\INC -LC:\lib -ml demo.c getkey.c \lib\fpclib.lib
  168.  
  169.      -IC:\INC   C:\INC is the include subdirectory for header files
  170.      -LC:\LIB   C:\LIB is the library subdirectory for Turbo C libraries
  171.      -ml        selects large memory model
  172.      \lib       is the subdirectory where fpclib.lib is located
  173.                             
  174.  
  175. Microsoft C
  176. -----------
  177.     C>cl /AL /F 4000 demo.c getkey.c \lib\fpclib.lib
  178.  
  179.    /AL         selects large memory model
  180.    /F 4000      create a 16K stack area
  181.    \lib         is the subdirectory where fpclib.lib is located
  182.  
  183.                                Chapter 2
  184.                                  FPCWin
  185.  
  186.                   +--------------------------------+
  187.                   |                                |
  188.                   |  The functions in this section |
  189.                   |   perform windowing functions  |
  190.                   |   that follow the conventions  |
  191.                   |        used by OS/2 PM.        |
  192.                   |                                |
  193.                   | Thank-you for supporting the   |
  194.                   |        FlashPac Library        |
  195.                   |                                |
  196.                   +--------------------------------+
  197.  
  198. Overview
  199.  
  200. The set of functions in this chapter describe the parts of FPCWin that
  201. let you create and use a message queue.  The system will collect all 
  202. keyboard and mouse events and place them in the system message queue. 
  203. Messages can be retrieved in the order they were placed in the queue.
  204. An applications message queue is provided for your own use.  The
  205. declarations are defined in fpcwin.h.
  206.  
  207. Declarations
  208.  
  209. #define   FPENTRY   pascal far
  210. #define   PTR   far *
  211.  
  212. typedef char                    CHAR;      
  213. typedef short                   SHORT;     
  214.  
  215. typedef char                    CHAR;          /* ch    */
  216. typedef short                   SHORT;         /* s    */
  217. typedef long                    LONG;          /* l    */
  218.  
  219. typedef unsigned char           UCHAR;         /* uch    */
  220. typedef unsigned short          USHORT;        /* us    */
  221. typedef unsigned long           ULONG;         /* ul    */
  222.  
  223. typedef unsigned char           BYTE;          /* b    */
  224.  
  225. typedef unsigned char           *PSZ;      
  226. typedef unsigned char           *PCH;      
  227.  
  228. typedef BYTE                    *PBYTE;    
  229.  
  230. typedef CHAR                    *PCHAR;    
  231. typedef SHORT                   *PSHORT;   
  232. typedef LONG                    *PLONG;    
  233.  
  234. typedef UCHAR                   *PUCHAR;   
  235. typedef USHORT                  *PUSHORT;  
  236. typedef ULONG                   *PULONG;   
  237.  
  238. typedef unsigned short          BOOL;          /* f    */
  239. typedef BOOL                    *PBOOL;    
  240.  
  241. typedef unsigned short          SHANDLE;   
  242. typedef void far                *LHANDLE;  
  243. typedef void far                *MPARAM;       /* msg param    */
  244.  
  245. typedef LHANDLE                 HWND;          /* hwnd    */
  246. typedef HWND                    *PHWND;    
  247. typedef LHANDLE                 HMQ;           /* hmq    */
  248. typedef LHANDLE                 HAB;           /* hab    */
  249.  
  250. typedef VOID FAR                *MPARAM;       /* mp    */
  251. typedef MPARAM FAR              *PMPARAM;      /* pmp    */
  252.  
  253. typedef VOID FAR                *MRESULT;      /* mres    */
  254. typedef MRESULT FAR             *PMRESULT;     /* pmres    */
  255.  
  256. typedef USHORT                  HMODULE;       /* hmod    */
  257. typedef HMODULE FAR             *PHMODULE; 
  258.  
  259. typedef VOID FAR                *PVOID;
  260.  
  261. ----------------------------------------------------------------------
  262. WinCreateMsgQueue
  263. ----------------------------------------------------------------------
  264.  
  265. Description   This function creates a message queue for the current 
  266.               pro cess.  It must be called after WinInitialize but 
  267.               before any other FPCWin functions.  This function can
  268.               only be called once per process.
  269.  
  270. Summary       HMQ WinCreateMsgQueue( hab, cmsg );
  271.               HAB        hab             Specifies a handle to the 
  272.                                          anchor block.
  273.               SHORT      cmsg            Specifies the maximum size 
  274.                                          of the queue.  The default 
  275.                                          queue may be specified by 
  276.                                          using the constant 
  277.                                          DEFAULT_QUEUE_SIZE.
  278.  
  279. Returns       Returns a handle to the message queue if successful, or 
  280.               NULL is unable to create a new message queue.
  281.  
  282. Remarks       The default queue size is ten messages.  The program 
  283.               should create a larger queue if ten messages is the 
  284.               system is losing messages.
  285.  
  286. Example       See program example 1.
  287.  
  288. Source        queues.asm
  289.  
  290. ----------------------------------------------------------------------
  291. WinDestroyMsgQueue
  292. ----------------------------------------------------------------------
  293.  
  294. Description   This function destoys the message queue.  This function 
  295.               should be called if any program uses a message queue 
  296.               created by WinCreateMsgQueue.
  297.  
  298. Summary       BOOL WinDestroyMsgQueue( hmq );
  299.               HMQ        hmq             Handle to the message queue 
  300.                                          to be destroyed.
  301.  
  302. Returns       Returns TRUE is successful or FALSE is an error 
  303.               occurred.
  304.  
  305. Example       See program example 1.
  306.  
  307. Source        queues.asm
  308.  
  309. ----------------------------------------------------------------------
  310. WinGetMsg
  311. ----------------------------------------------------------------------
  312.  
  313. Description   This function retrieves the next message from the 
  314.               message queue hat conforms to the filtering criteria.
  315.  
  316. Summary       BOOL WinGetMsg( hab, qmsg, hwndFilter, 
  317.               msgFilterFirst, msgFilterLast );
  318.               HAB        hab             Anchor block handle.
  319.               PQMSG      qmsg            Points to the QMSG structure 
  320.                                          that will contain the 
  321.                                          returned message.  QMSG is 
  322.                                          defined in the following 
  323.                                          form:
  324.  
  325.                                          typedef struct _QMSG {
  326.                                          HWND   hwnd;
  327.                                          USHORT   msg;
  328.                                          MPARAM   mp1;
  329.                                          MPARAM   mp2;
  330.                                          ULONG   time;
  331.                                          POINTL   ptl;
  332.                                          } QMSG;
  333.               HWND       hwndFilter      Window filter identifier.
  334.               USHORT     msgFilterFirst  Specifies first message.
  335.               USHORT     msgFilterLast   Specifies last message.
  336.  
  337. Returns       If the message retrieved is not WM_QUIT then TRUE is 
  338.               returned, otherwise FALSE is returned.
  339.  
  340. Remarks       Filtering allows a program to process messages in an 
  341.               order that is different from the one in the message 
  342.               queue.  Use fil tering to retrieve messages of a 
  343.               particular type, rather than retrieving other types of 
  344.               messages at an inconvenient place
  345.  
  346.                in the program logic.  For example, when a mouse 
  347.               button down message is retrieved, the program can use 
  348.               filtering to wait for the mouse button up message 
  349.               without processing other messages.
  350.  
  351.               When the hwndFilter parameter is not NULL, it limits 
  352.               the system to returning a message to a specific window 
  353.               or its child windows.
  354.  
  355.               The msgFilterFirst and msgFilterLast parameters are 
  356.               used to restrict the range of message types that may be 
  357.               returned.  If msgFilterFirst and msgFilterLast are both 
  358.               zero, all mes sages are returned.  If msgFilterFirst is 
  359.               less than msgFilterLast then o
  360.  
  361.               nly those messages that lie in that range will be 
  362.               returned.  If msgFilterFirst is greater than 
  363.               msgFilterLast, all messages except the ones that lie 
  364.               between msgFilterFirst and msgFilterLast will be 
  365.               returned.
  366.  
  367.               For example,  using the constants WM_MOUSEFIRST and 
  368.               WM_MOUSELAST for msgFilterFirst and msgFilterLast can 
  369.               be used to filter out all messages except mouse 
  370.               messages.
  371.  
  372. Example       See program example 1.
  373.  
  374. Source        queues.asm
  375.  
  376. ----------------------------------------------------------------------
  377. WinInitialize
  378. ----------------------------------------------------------------------
  379.  
  380. Description   This function initializes the 
  381.  
  382. Summary       HAB WinInitialize( fsOptions );
  383.               USHORT     fsOptions       Specifies initialization 
  384.                                          options. This parameter must 
  385.                                          be zero.
  386.  
  387. Returns       If the initialization process is successful the Handle 
  388.               Anchor Block is returned, otherwise NULL is returned if 
  389.               an error occurred.
  390.  
  391. Remarks       the initialization process sets up pointers for a 
  392.               message queue in the main thread of the system.  In 
  393.               addition, the video parameters are set, the window is 
  394.               cleared, and the mouse, keyboard and timer  interrupt 
  395.               handlers are initialized.
  396.  
  397. Example       See program example 1.
  398.  
  399. Source        queues.asm
  400.  
  401. ----------------------------------------------------------------------
  402. WinPeekMsg
  403. ----------------------------------------------------------------------
  404.  
  405. Description   This function is used to inspect the message queue.
  406.  
  407. Summary       BOOL WinPeekMsg( hab, qmsg, hwndFilter, msgFilterFirst, 
  408.               msgFilterLast , fs );
  409.               HAB        hab             Anchor block handle.
  410.               PQMSG      qmsg            Points to the QMSG structure 
  411.                                          that will contain the 
  412.                                          returned
  413.               message.   QMSG            is defined in the following 
  414.                                          form:
  415.  
  416.                                          typedef struct _QMSG {
  417.                                          HWND   hwnd;
  418.                                          USHORT   msg;
  419.                                          MPARAM   mp1;
  420.                                          MPARAM   mp2;
  421.                                          ULONG   time;
  422.                                          POINTL   ptl;
  423.                                          } QMSG;
  424.  
  425.               HWND       hwndFilter      Window filter identifier.
  426.               USHORT     msgFilterFirst  Specifies first message.
  427.               USHORT     msgFilterLast   Specifies last message.
  428.               USHORT     fs              Specifies if the message 
  429.                                          should be left in the queue 
  430.                                          or removed from the queue.  
  431.                                          If PM_REMOVE is specified 
  432.                                          then the message is removed 
  433.                                          from the queue.  If 
  434.                                          PM_NOREMOVE or nothing is 
  435.                                          specified then the message 
  436.                                          is not removed from the qu
  437.  
  438.               eue.T     msgFilterLast   Specifies last message.
  439.  
  440. Returns       If a message is available TRUE is returned, otherwise 
  441.               FALSE is returned.
  442.  
  443. Remarks       This function is the same as WinGetMsg except that is 
  444.               doesn't wait for a message if one is not in the queue 
  445.               and it also allows for letting a message remain in the 
  446.               queue.
  447.  
  448. Example       See program example 1.
  449.  
  450. Source        queues.asm
  451.  
  452. ----------------------------------------------------------------------
  453. WinPostMsg
  454. ----------------------------------------------------------------------
  455.  
  456. Description   This function will post a message to the message queue 
  457.               for the specified window.
  458.  
  459. Summary       BOOL WinPostMsg( hwnd, msg, mp1, mp2 );
  460.               HWND       hwnd            Identifies window to post 
  461.                                          mes sage to.  If NULL then 
  462.                                          the message is posted to the 
  463.                                          queue associated with the 
  464.                                          current thread.
  465.               USHORT     msg             Message to be posted.
  466.               MPARAM     mp1             First message parameter.
  467.               MPARAM     mp2             Second message parameter.
  468.  
  469. Returns       TRUE if successful or FALSE if an error occurred.
  470.  
  471. Remarks       WinPostMsg returns immediately.   
  472.  
  473. Example       See program example 1.
  474.  
  475. Source        queues.asm
  476.  
  477. ----------------------------------------------------------------------
  478. WinTerminate
  479. ----------------------------------------------------------------------
  480.  
  481. Description   This function terminates the programs use of FPCWin and
  482.               releases all of the associated resources.  This 
  483.               function has to be called prior to termination of your 
  484.               program.
  485.  
  486. Summary       HAB WinInitialize( hab );
  487.               HAB        hab             Handle to the anchor block.
  488.  
  489. Returns       TRUE if successful or FALSE if an error occurred.
  490.  
  491. Example       See program example 1.
  492.  
  493. Source        queues.asm
  494.  
  495.  
  496.  
  497.                                Chapter 3
  498.                              Direct Video
  499.  
  500.                   +--------------------------------+
  501.                   |                                |
  502.                   |  The functions in this section |
  503.                   |  perform direct reads & writes |
  504.                   |   of text data to the screen.  |
  505.                   |                                |
  506.                   | Thank-you for supporting the   |
  507.                   |        FlashPac Library        |
  508.                   |                                |
  509.                   +--------------------------------+
  510.  
  511. Declarations
  512.  
  513. #define FAR       far
  514. #define FPENTRY   pascal far
  515. #define PTR       far *
  516.  
  517. typedef char                    CHAR;      
  518. typedef unsigned char           BYTE;      
  519. typedef signed int              INT;       
  520. typedef unsigned int            UINT;      
  521. typedef signed short int        INT2;      
  522. typedef unsigned short int      UINT2;     
  523. typedef long                    INT4;      
  524. typedef unsigned long           UINT4;     
  525. typedef float                   REAL4;     
  526. typedef double                  REAL8;     
  527. typedef unsigned int            WORD;      
  528.  
  529. BYTE   CheckSnow   enables or disables snow-checking when reading or
  530.                    writing data directly to video memory.
  531.  
  532. BYTE   TextAttr    global variable that contains the currently
  533.                    selected video attribute.
  534.  
  535. INT2   InsMode     global variable used by EditSt to indicate if the
  536.                    cursor is in insert or overwrite mode.
  537.  
  538. INT2   VioBaseSeg  contains the base segment address of the current
  539.                    video page.
  540.  
  541. INT2   VioCols     contains the screen width which is the total number
  542.                    of characters per line.
  543.  
  544. INT2   VioCursor   contains the size of the cursor with the starting
  545.                    scan line in the high byte and the ending scan line
  546.                    in the low byte.
  547.  
  548. INT2   VioPage     contains the active video page in use.  The value
  549.                    should always be zero for a monochrome adapter.
  550.  
  551. INT2   WindMax     defines the lower right corner of the window that
  552.                    is currenlty defined thru the use of the Window
  553.                    function.
  554.  
  555. INT2   WindMin     defines the upper left corner of the window that is
  556.                    currently defined thru the use of the Window
  557.                    function.
  558.  
  559. ----------------------------------------------------------------------
  560. BorderColor
  561. ----------------------------------------------------------------------
  562.  
  563. Description   Sets the color for the border screen.
  564.  
  565. Summary       VOID BorderColor( Color );
  566.               INT        Color           defines color of the border 
  567.                                          on the screen.
  568.  
  569. Remarks       The following colors are allowed for the border color 
  570.               on a Color Graphics Adapter.  BorderColor has no effect 
  571.               on a monochrome display.
  572.                                                   
  573.                  0   Black    8   Gray
  574.                  1   Blue     9   Light Blue
  575.                  2   Green   10   Light Green
  576.                  3   Cyan    11   Light Cyan
  577.                  4   Red     12   Light Red
  578.                  5   Magenta 13   Light Magenta
  579.                  6   Brown   14   Yellow
  580.                  7   White   15   High-intensity White
  581.  
  582. Example       See program example 2.
  583.  
  584. Source        border.asm
  585.  
  586. ----------------------------------------------------------------------
  587. ClrWin
  588. ----------------------------------------------------------------------
  589.  
  590. Description   Clear window area with the specified color.
  591.  
  592. Summary       VOID ClrWin( x1, y1, x2, y2, Attr );
  593.               INT        x1              left column of window.
  594.               INT        y1              top row of window.
  595.               INT        x2              right column of window.
  596.               INT        y2              bottom row of window.
  597.               INT        Attr            integer in the range 0-255 
  598.                                          defining the foreground and 
  599.                                          background byte combination 
  600.                                          for the color of the window.
  601.  
  602. Remarks       This procedure will blank the window area for the 
  603.               window coordinates that are passed.  ClrWin does not 
  604.               move the cursor from its current position.
  605.  
  606. Example       See program examples    2-7
  607.  
  608. Source        clrwin.asm
  609.  
  610. ----------------------------------------------------------------------
  611. ColorMsg
  612. ----------------------------------------------------------------------
  613.  
  614. Description   Display string on the screen using the color attribute 
  615.               specified.
  616.  
  617. Summary       VOID ColorMsg( x, y, Attr, Msg );
  618.               INT        x               column to begin display of 
  619.                                          message.
  620.               INT        y               row to begin display of mes 
  621.                                          sage.
  622.               INT        Attr            integer in the range 0-255.  
  623.                                          It is the color to use for 
  624.                                          displaying the message.
  625.               CHAR       *Msg            string message to be 
  626.                                          displayed.
  627.  
  628. Remarks       ColorMsg is NOT sensitive to Turbo's currently defined 
  629.               win dow and will wrap around to column one on the next 
  630.               line of the screen when necessary. ColorMsg will not 
  631.               scroll the screen if the data to be displayed is to 
  632.               extend beyond the last row 
  633.  
  634.               of the screen.
  635.  
  636. See Also      DspMsg, WriteSt, WriteStln
  637.  
  638. Example       See program examples    2,3
  639.  
  640. Source        colormsg.asm
  641.  
  642. ----------------------------------------------------------------------
  643. DspMsg
  644. ----------------------------------------------------------------------
  645.  
  646. Description   Display string on the screen without changing the color 
  647.               attribute that is currently on the display screen.
  648.  
  649. Summary       VOID DspMsg( x, y, Msg );
  650.               INT        x               column to begin display of 
  651.                                          message.
  652.               INT        y               row to begin display of mes 
  653.                                          sage.
  654.               CHAR       *Msg            string message to display.
  655.  
  656. Remarks       DspMsg is NOT sensitive to Turbo's currently defined 
  657.               win dow and will  wrap around to column one on the next 
  658.               line of the screen when necessary. DspMsg will not 
  659.               scroll the screen if the data to be displayed is to 
  660.               extend beyond the last row of 
  661.  
  662.               the screen.
  663.  
  664. See Also      ColorMsg, WriteSt, WriteStln
  665.  
  666. Example       See program examples  2,6,7
  667.  
  668. Source        dspmsg.asm
  669.  
  670. ----------------------------------------------------------------------
  671. EditSt
  672. ----------------------------------------------------------------------
  673.  
  674. Description   Edit an existing or null string from the keyboard.
  675.  
  676. Summary       VOID EditSt( Row, StCol, SpCol, Len, ChCase, FillCh, 
  677.               AutoSkip, ErrTone, ErrDur, VCSet, TCSet, ChOfs, TE, St 
  678.               );
  679.               INT        Row             defines row to edit string 
  680.                                          on.
  681.               INT        StCol           defines left or start column 
  682.                                          of field to edit. This value 
  683.                                          must be less than or equal 
  684.                                          to SpCol.
  685.               INT        SpCol           defines right or stop column 
  686.                                          of the field to edit. This 
  687.                                          value must be greater than 
  688.                                          or equal to StCol.
  689.               INT        Len             integer in the range of 
  690.                                          1-255.  It is the maximum 
  691.                                          length of the string to be 
  692.                                          edited.
  693.               INT        ChCase          integer in the range 1-3. 
  694.                                          The
  695.               Case       Mode            indicator defines how a 
  696.                                          character is displayed on 
  697.                                          the screen and stored in the 
  698.                                          string variable being 
  699.                                          edited.
  700.                                          1 = Do nothing to character
  701.                                          2 = Convert all chars to 
  702.                                          upper case
  703.                                          3 = Convert all chars to 
  704.                                          lower case
  705.               INT        FillCh          integer in the range of 
  706.                                          0-255.  This defines the 
  707.                                          ascii character that is 
  708.                                          displayed in the field for 
  709.                                          undefined character 
  710.                                          positions in the field being 
  711.                                          edited.
  712.               INT        AutoSkip        integer indicating if an 
  713.                                          auto exit is desired when 
  714.                                          the last charac ter in the 
  715.                                          field has been typed.
  716.                                          0 - No auto exit
  717.                                          1 - Auto exit after last 
  718.                                          char in field is entered.
  719.               UINT       ErrTone         integer in units giving the 
  720.                                          fre quency for beeping the 
  721.                                          speaker.
  722.               UINT       ErrDur          integer in units giving the 
  723.                                          length of time the speaker 
  724.                                          is to beep.
  725.               CHAR       *VCSet          set of valid characters, 
  726.                                          [0..255], that will be 
  727.                                          accepted for data entry.
  728.               CHAR       *TCSet          set of extended keyboard 
  729.                                          char acters, [0..255], that 
  730.                                          are allowed to terminate 
  731.                                          this procedure. (Refer to 
  732.                                          appendix C for a listing of 
  733.                                          these codes.)
  734.               INT        *CharOfs        an integer that indicates 
  735.                                          the beginning cursor 
  736.                                          position within the string.  
  737.                                          If CharOfs is a 1 then 
  738.                                          editing will begin in the 
  739.                                          first column of the field 
  740.                                          input area.  If ChOfs is 256 
  741.                                          or greater than the length 
  742.                                          of the string to be
  743.  
  744.                                          edited, the cursor will be 
  745.                                          positioned after the last 
  746.                                          character in the string. On 
  747.                                          exit from EditSt ChOfs will 
  748.                                          contain the cursor position 
  749.                                          within the string.
  750.               INT        *TE             is the terminating element 
  751.                                          number that terminated the 
  752.                                          string input procedure. TE 
  753.                                          will be in the range of 
  754.                                          0-255 which corresponds to 
  755.                                          the element number in 
  756.                                          appendix C.
  757.               CHAR       *St             string buffer area to 
  758.                                          receive the input data.
  759.  
  760. Remarks       The maximum length of the string to edit is 255 
  761.               characters.  The  data will be entered on one line. If 
  762.               the maximum length of the string exceeds the number of 
  763.               display columns, (SpCol-StCol+1), the  string will 
  764.               scroll horizontally on the screen
  765.  
  766.                within the StCol and SpCol columns.
  767.  
  768. Edit Keys     Keys   The following gives an explanation of the editing 
  769.               keys that may be    used with EditSt, provided the key 
  770.               pressed is not defined in the    terminating character 
  771.               set. EditSt calls the function GetKey, in the unit 
  772.               SSGetKey, which returns
  773.  
  774.                            an integer.  This integer is a value from 
  775.                            0-384 which corre sponds to an element 
  776.                            number that is defined in Appendix C.  The 
  777.                            function GetKey is provided with a table 
  778.                            that maps the key element numbers to the 
  779.                            index number.  Example, If the cursor is 
  780.                            to
  781.  
  782.                            move right one character position using 
  783.                            the
  784.               Ctrl-D       key combination the value for Ctrl-D index 
  785.                            key (ele ment number 136) must map to the 
  786.                            right arrow key (element number 77). The 
  787.                            initialization of the Ctrl-D key for 
  788.                            KeyTable[136] would be 77.
  789.  
  790.               LeftArr      will move the cursor left one character 
  791.                            position on the screen until the StCol is 
  792.                            reached.  If the beginning of the string 
  793.                            has not been reached the string will be 
  794.                            scrolled on the screen within the StCol 
  795.                            and SpCol boundaries.
  796.  
  797.               RightArr     will move the cursor right one character 
  798.                            position on the screen until the end of 
  799.                            the string is reached.  If the cursor is 
  800.                            in the SpCol and there is still more in 
  801.                            the string that can be displayed the 
  802.                            string will then be scrolle
  803.  
  804.               d            within the StCol and SpCol boundaries.
  805.  
  806.               Home         will place the cursor in the StCol on the 
  807.                            screen and positioned under the first 
  808.                            character in the edit string.
  809.  
  810.               End          will position the cursor after the last 
  811.                            character in the edit string.
  812.  
  813.               BackSpace    If the StCol is displaying the first 
  814.                            character in the string being edited the 
  815.                            cursor will move to the left one column 
  816.                            and delete the character in that column. 
  817.                            If the character being displayed in the  
  818.                            StCol is not the first cha
  819.  
  820.               r            acter in the string being edited the 
  821.                            cursor will remain in the same column 
  822.                            position and delete the character to the 
  823.                            left of the cursor and pull the string 
  824.                            towards the cursor.
  825.  
  826.               Esc          will blank the string currently in the 
  827.                            field.  If the field is already blank the 
  828.                            procedure will restore the string that was 
  829.                            passed to this procedure.
  830.  
  831.               Tab          will move the cursor to the right five 
  832.                            column positions if the SpCol has not been 
  833.                            reached.  If the StCol has been reached 
  834.                            then the string display will be shifted 
  835.                            right.
  836.  
  837.               ^LeftArrow   will move the cursor to the left five 
  838.                            column positions if the StCol has not been 
  839.                            reached.  If the cursor is in the StCol 
  840.                            then only the display string will be 
  841.                            adjusted to reflect the move ment of the 
  842.                            cursor.
  843.  
  844.               Del          removes the character the cur sor is under 
  845.                            and decrements the string length by one. 
  846.                            All the characters to the right of the 
  847.                            cursor position are moved left one 
  848.                            position within the string and display 
  849.                            area.
  850.  
  851.               ^X           will delete all characters from the 
  852.                            current string position to the end of the 
  853.                            string.  All deleted characters will be 
  854.                            replaced with the FillCh that was 
  855.                            specified when calling this procedure.
  856.  
  857. Example       See program example  3
  858.  
  859. Source        editst.asm
  860.  
  861. ----------------------------------------------------------------------
  862. FillColAttr
  863. ----------------------------------------------------------------------
  864.  
  865. Description   Display a column of attribute bytes on the screen.
  866.  
  867. Summary       VOID FillColAttr( x, y, NRows, Attr );
  868.               INT        x               defines column to begin 
  869.                                          display of attribute.
  870.               INT        y               defines row to begin display 
  871.                                          of attribute.
  872.               INT        NRows           integer in the range 1-25 
  873.                                          for the number of rows to 
  874.                                          display the attribute byte 
  875.                                          on.
  876.               INT        Attr            integer in the range 0-255. 
  877.                                          It is the attribute byte to 
  878.                                          be dis played on the screen.
  879.  
  880. Remarks       FillColAttr always acts on the entire screen and is NOT 
  881.               sensitive to Turbo's currently defined window.
  882.  
  883. See Also      FillColCell, FillColChar
  884.  
  885. Example       See program example 4
  886.  
  887. Source        fcolbyte.asm
  888.  
  889. ----------------------------------------------------------------------
  890. FillColCell
  891. ----------------------------------------------------------------------
  892.  
  893. Description   Fill a column on the screen with a character.
  894.  
  895. Summary       VOID FillColCell( x, y, NRows, Cell );
  896.               INT        x               defines column to begin 
  897.                                          display of data.
  898.               INT        y               defines row to begin display 
  899.                                          of data.
  900.               INT        NRows           integer in the range 1-25 
  901.                                          for the number of rows to 
  902.                                          display the character and 
  903.                                          attribute bytes on the 
  904.                                          screen.
  905.               INT        Cell            integer in the range 
  906.                                          0-0xffff.  This is the 
  907.                                          character and attribute word 
  908.                                          combination where the high 
  909.                                          order byte is the character 
  910.                                          and the low order byte is 
  911.                                          the attribute to be 
  912.                                          displayed.
  913.  
  914. Remarks       FillColCell always acts on the entire screen.
  915.  
  916. See Also      FillColAttr, FillColChar
  917.  
  918. Example       See program example 5 
  919.  
  920. Source        fcolcell.asm
  921.  
  922. ----------------------------------------------------------------------
  923. FillColChar
  924. ----------------------------------------------------------------------
  925.  
  926. Description   Fill a column on the screen with a character.
  927.  
  928. Summary       VOID FillColChar( x, y, NRows, Ch );
  929.               INT        x               defines column to begin 
  930.                                          display of character.
  931.               INT        y               defines row to begin display 
  932.                                          of character.
  933.               INT        NRows           integer in the range 1-25 
  934.                                          for the number of rows to 
  935.                                          display the character on.
  936.               CHAR       Ch              char in the range 0-255. It 
  937.                                          is the
  938.               character  to              be displayed on the screen.
  939.  
  940. Remarks       FillColChar always acts on the entire screen and is NOT 
  941.               sensitive to  compiler's predefined window.
  942.  
  943. See Also      FillColAttr, FillColCell
  944.  
  945. Example       See program example 4
  946.  
  947. Source        fcolbyte.asm
  948.  
  949. ----------------------------------------------------------------------
  950. FillFrameAttr
  951. ----------------------------------------------------------------------
  952.  
  953. Description   Fill the frame area defined by x1,y1,x2,y2 coordinates 
  954.               with the attribute byte defined.
  955.  
  956. Summary       VOID FillFrameAttr( x1, y1, x2, y2, Attr );
  957.               INT        x1              left column of window.
  958.               INT        y1              top row of window.
  959.               INT        x2              right column of window.
  960.               INT        y2              bottom row of window.
  961.               INT        Attr            integer in the range 0-255.  
  962.                                          It is the attribute to be 
  963.                                          displayed on the screen in 
  964.                                          the specified frame area.
  965.  
  966. See Also      FillFrameCell, FillFrameChar
  967.  
  968. Example       See program example 6
  969.  
  970. Source        frambyte.asm
  971.  
  972. ----------------------------------------------------------------------
  973. FillFrameCell
  974. ----------------------------------------------------------------------
  975.  
  976. Description   Fill the frame area defined by x1,y1,x2,y2 coordinates 
  977.               with the cell  defined.
  978.  
  979. Summary       VOID FillFrameCell( x1, y1, x2, y2, Cell );
  980.               INT        x1              left column of window.
  981.               INT        y1              top row of window.
  982.               INT        x2              right column of window.
  983.               INT        y2              bottom row of window.
  984.               INT        Cell            integer in the range 0-255.  
  985.                                          This is the character and 
  986.                                          attribute word combination 
  987.                                          where the high byte is the 
  988.                                          character and the low byte 
  989.                                          is the attribute for the 
  990.                                          cell to be displayed on the 
  991.                                          screen in the specified 
  992.                                          frame area.
  993.  
  994. See Also      FillFrameAttr, FillFrameChar
  995.  
  996. Example       See program example 7
  997.  
  998. Source        framcell.asm
  999.  
  1000. ----------------------------------------------------------------------
  1001. FillFrameChar
  1002. ----------------------------------------------------------------------
  1003.  
  1004. Description   Fill the frame area defined by x1,y1,x2,y2 coordinates 
  1005.               with the character byte defined.
  1006.  
  1007. Summary       VOID FillFrameChar( x1, y1, x2, y2, Ch );
  1008.               INT        x1              left column of window.
  1009.               INT        y1              top row of window.
  1010.               INT        x2              right column of window.
  1011.               INT        y2              bottom row of window.
  1012.               CHAR       Ch              character that will be 
  1013.                                          displayed on the screen in 
  1014.                                          the specified frame area.
  1015.  
  1016. See Also      FillFrameAttr, FillFrameCell
  1017.  
  1018. Example       See program example 6
  1019.  
  1020. Source        frambyte.asm
  1021.  
  1022. ----------------------------------------------------------------------
  1023. FillRowAttr
  1024. ----------------------------------------------------------------------
  1025.  
  1026. Description   Write N copies of the attribute byte on the screen 
  1027.               starting at the  specified x,y coordinates.
  1028.  
  1029. Summary       VOID FillRowAttr( x, y, NBytes, Attr );
  1030.               INT        x               defines column to begin 
  1031.                                          display of attribute byte.
  1032.               INT        y               defines row to begin display 
  1033.                                          of attribute byte.
  1034.               INT        NBytes          gives number of times to 
  1035.                                          display the attribute byte 
  1036.                                          on the screen.
  1037.               INT        Attr            integer in the range 0-255.  
  1038.                                          It is
  1039.               the        attribute       byte to be dis played on the 
  1040.                                          screen.
  1041.  
  1042. Remarks       FillRowAttr always acts on the entire screen and is NOT 
  1043.               sensitive to  any compiler specific defined window.
  1044.  
  1045. See Also      FillRowCell, FillFrameChar
  1046.  
  1047. Example       See program example 
  1048.  
  1049. Source        frowbyte.asm
  1050.  
  1051. ----------------------------------------------------------------------
  1052. FillRowCell
  1053. ----------------------------------------------------------------------
  1054.  
  1055. Description   Write N copies of the character and attribute byte on 
  1056.               the screen  starting at the specified x,y coordinates.
  1057.  
  1058. Summary       VOID FillRowCell( x, y, NWords, Cell );
  1059.               INT        x               defines column to begin 
  1060.                                          display of cell word.
  1061.               INT        y               defines row to begin display 
  1062.                                          of cell word.
  1063.               INT        NWords          gives the number times to 
  1064.                                          dis play the character and 
  1065.                                          attribute bytes on the 
  1066.                                          screen.
  1067.               INT2       Cell            character and attribute 
  1068.                                          bytes to be displayed on the 
  1069.                                          screen.
  1070.  
  1071. Remarks       FillRowCell always acts on the entire screen and is NOT 
  1072.               sensitive to  any compiler specific defined window.
  1073.  
  1074. See Also      FillRowAttr, FillFrameChar
  1075.  
  1076. Example       See program example  9
  1077.  
  1078. Source        frowcell.asm
  1079.  
  1080. ----------------------------------------------------------------------
  1081. FillRowChar
  1082. ----------------------------------------------------------------------
  1083.  
  1084. Description   Write N copies of the character byte on the screen 
  1085.               starting at the  specified x,y coordinates.
  1086.  
  1087. Summary       VOID FillRowChar( x, y, NBytes, Ch );
  1088.               INT        x               defines column to begin 
  1089.                                          display of character.
  1090.               INT        y               defines row to begin display 
  1091.                                          of character.
  1092.               INT        NBytes          gives number of times to 
  1093.                                          display the character on the 
  1094.                                          screen.
  1095.               CHAR       Ch              value in the range 0-255.  
  1096.                                          It' the value or ascii 
  1097.                                          character to be displayed.
  1098.  
  1099. Remarks       FillRowChar always acts on the entire screen and is NOT 
  1100.               sensitive to any compiler specific defined window.
  1101.  
  1102. See Also      FillRowAttr, FillFrameCell
  1103.  
  1104. Example       See program example 4,5
  1105.  
  1106. Source        frowbyte.asm
  1107.  
  1108. ----------------------------------------------------------------------
  1109. FrameWin
  1110. ----------------------------------------------------------------------
  1111.  
  1112. Description   Frames the window currently defined by the global 
  1113.               variables WindMax and WindMin with the specified 
  1114.               characters.
  1115.  
  1116. Summary       VOID FrameWin( UL, UR, LL, LR, Hor, Ver, Attr );
  1117.               CHAR       UL              char in upper left corner of 
  1118.                                          win dow.
  1119.               CHAR       UR              char in upper right corner 
  1120.                                          of window.
  1121.               CHAR       LL              char in lower left corner of 
  1122.                                          win dow.
  1123.               CHAR       LR              char in lower right corner 
  1124.                                          of window.
  1125.               CHAR       Hor             horizontal char for top and 
  1126.                                          bot tom rows of window.
  1127.               CHAR       Ver             vertical char for left and 
  1128.                                          right columns of window.
  1129.               INT        Attr            attribute color to use for 
  1130.                                          window frame display.
  1131.  
  1132. Remarks       FrameWin will outline the window that is currently 
  1133.               defined by the global variables WindMin and WindMax 
  1134.               with the charac ters passed.  The coordinates given by 
  1135.               WindMin and WindMax are used to frame the window area.
  1136.  
  1137.               Once the window frame has been displayed WindMin and 
  1138.               WindMax will be adjusted so the window will fit within 
  1139.               the framed area.  (e.g. if  the current window is 
  1140.               defined as 1,1,80,25 then after FrameWin the  current 
  1141.               window will be 2,2,79,24).
  1142.  
  1143. Example       See program examples 3-9
  1144.  
  1145. Source        framewin.asm
  1146.  
  1147. ----------------------------------------------------------------------
  1148. GetCursorSize
  1149. ----------------------------------------------------------------------
  1150.  
  1151. Description   Reports the starting and ending scan lines of the 
  1152.               current cursor.
  1153.  
  1154. Summary       INT2 GetCursorSize( VOID );
  1155.  
  1156. Returns       Gets the cursor size by reporting the starting scan 
  1157.               line in the high  byte and the ending scan line in the 
  1158.               low byte of the word.
  1159.  
  1160. Example       See program example 10.
  1161.  
  1162. Source        gcursize.asm
  1163.  
  1164. ----------------------------------------------------------------------
  1165. GetFrameAttr
  1166. ----------------------------------------------------------------------
  1167.  
  1168. Description   Read the attribute bytes for the specified area on the 
  1169.               screen into the buffer area.
  1170.  
  1171. Summary       VOID GetFrameAttr( x1, y1, x2, y2, Buffer );
  1172.               INT        x1              left column of window.
  1173.               INT        y1              top row of window.
  1174.               INT        x2              right column of window.
  1175.               INT        y2              bottom row of window.
  1176.               CHAR       *Buffer         data area where data from 
  1177.                                          screen will be placed.
  1178.  
  1179. See Also      GetFrameCell, GetFrameChar
  1180.  
  1181. Example       See program example 
  1182.  
  1183. Source        gframbyt.asm
  1184.  
  1185. ----------------------------------------------------------------------
  1186. GetFrameCell
  1187. ----------------------------------------------------------------------
  1188.  
  1189. Description   Read the character and attributes bytes for the 
  1190.               specified area on the screen into the buffer area.
  1191.  
  1192. Summary       VOID GetFrameCell( x1, y1, x2, y2, Buffer );
  1193.               INT        x1              left column of window.
  1194.               INT        y1              top row of window.
  1195.               INT        x2              right column of window.
  1196.               INT        y2              bottom row of window.
  1197.               CHAR       *Buffer         data area where data from 
  1198.                                          screen will be placed.
  1199.  
  1200. See Also      GetFrameAttr, GetFrameChar
  1201.  
  1202. Example       See program example 
  1203.  
  1204. Source        gframbyt.asm
  1205.  
  1206. ----------------------------------------------------------------------
  1207. GetFrameChar
  1208. ----------------------------------------------------------------------
  1209.  
  1210. Description   Read the character bytes for the specified area on the 
  1211.               screen into the buffer area.
  1212.  
  1213. Summary       VOID GetFrameChar( x1, y1, x2, y2, Buffer );
  1214.               INT        x1              left column of window.
  1215.               INT        y1              top row of window.
  1216.               INT        x2              right column of window.
  1217.               INT        y2              bottom row of window.
  1218.               CHAR       *Buffer         data area where data from 
  1219.                                          screen will be placed.
  1220.  
  1221. See Also      GetFrameAttr, GetFrameCell
  1222.  
  1223. Example       See program example 
  1224.  
  1225. Source        gframbyt.asm
  1226.  
  1227. ----------------------------------------------------------------------
  1228. GetScrn
  1229. ----------------------------------------------------------------------
  1230.  
  1231. Description   Read the character and attribute bytes starting from 
  1232.               speci fied position on the screen into the buffer.
  1233.  
  1234. Summary       VOID GetScrn( x, y, NWords, Buffer );
  1235.               INT        x               column to begin reading data 
  1236.                                          from the screen.
  1237.               INT        y               row to begin reading data 
  1238.                                          from the screen.
  1239.               INT        NWords          number of words to read from 
  1240.                                          the display screen.
  1241.               CHAR       *Buffer         data area where the data 
  1242.                                          from
  1243.               the        display         screen will be placed.
  1244.  
  1245. Remarks       This procedure provides additional checks for vertical 
  1246.               and horizontal retrace periods on a CGA video adapter.  
  1247.               This is to eliminate the snow effect that is produced 
  1248.               from direct moves to or from the video display.  These 
  1249.               checks may be turned o
  1250.  
  1251.               ff through the global variable CheckSnow.
  1252.  
  1253. See Also      PutScrn
  1254.  
  1255. Example       See program example 
  1256.  
  1257. Source        gscrn.asm
  1258.  
  1259. ----------------------------------------------------------------------
  1260. GetVideoCols
  1261. ----------------------------------------------------------------------
  1262.  
  1263. Description   Get the number of columns per line for the current 
  1264.               display mode.
  1265.  
  1266. Summary       INT GetVideoCols( VOID );
  1267.  
  1268. Remarks       GetVideoCols will return the number of columns on the 
  1269.               screen.
  1270.  
  1271. See Also      GetVideoInfo
  1272.  
  1273. Example       See program example 
  1274.  
  1275. Source        gviocols.asm
  1276.  
  1277. ----------------------------------------------------------------------
  1278. GetVideoInfo
  1279. ----------------------------------------------------------------------
  1280.  
  1281. Description   Gets general video display informtion.
  1282.  
  1283. Summary       VOID GetVideoInfo( BaseSeg, Cols, Pg, Mode );
  1284.               INT        *BaseSeg        returns the base segment 
  1285.                                          address of the current video 
  1286.                                          page.
  1287.               INT        *Cols           returns the number of 
  1288.                                          display columns available 
  1289.                                          for the cur rent video mode.
  1290.               INT        *Pg             returns the active display 
  1291.                                          page for the video display.  
  1292.                                          This will always be zero for 
  1293.                                          the mono chrome display 
  1294.                                          adapter.
  1295.               INT        *Mode           returns the current video 
  1296.                                          display mode.
  1297.  
  1298. See Also      GetVideoCols, GetVideoMode, GetVideoPage
  1299.  
  1300. Example       See program example 
  1301.  
  1302. Source        gvioinfo.asm
  1303.  
  1304. ----------------------------------------------------------------------
  1305. GetVideoMode
  1306. ----------------------------------------------------------------------
  1307.  
  1308. Description   Gets the current video mode.
  1309.  
  1310. Summary       INT GetVideoMode( VOID );
  1311.  
  1312. Remarks       Returns an integer giving the current video mode the 
  1313.               system is in. Use the guide on video modes under 
  1314.               InitVideo.
  1315.  
  1316. See Also      GetVideoInfo
  1317.  
  1318. Example       See program example 
  1319.  
  1320. Source        gviomode.asm
  1321.  
  1322. ----------------------------------------------------------------------
  1323. GetVideoPage
  1324. ----------------------------------------------------------------------
  1325.  
  1326. Description   Gets the active display page currently in use.
  1327.  
  1328. Summary       INT GetVideoPage( VOID );
  1329.  
  1330. Remarks       On monochrome displays GetVideoPage will always return 
  1331.               a zero.
  1332.  
  1333. See Also      GetVideoInfo
  1334.  
  1335. Example       See program example 
  1336.  
  1337. Source        gviopage.asm
  1338.  
  1339. ----------------------------------------------------------------------
  1340. GotoxyAbs
  1341. ----------------------------------------------------------------------
  1342.  
  1343. Description   Position the cursor at the specified position on the 
  1344.               screen without  regards to the global variables WindMin 
  1345.               and Wind Max.
  1346.  
  1347. Summary       VOID GotoxyAbs( x, y );
  1348.               INT        x               column number to place the 
  1349.                                          cursor in.
  1350.               INT        y               row number to place the 
  1351.                                          cursor in.
  1352.  
  1353. Remarks       This procedure will place the cursor at the specified 
  1354.               x,y coordinates on the screen.  GotoxyAbs is NOT 
  1355.               sensitive to the global variables WindMin and WindMax.
  1356.  
  1357. See Also      WhereXAbs, WhereYAbs
  1358.  
  1359. Example       See program examples 2-5
  1360.  
  1361. Source        gotoxyab.asm
  1362.  
  1363. ----------------------------------------------------------------------
  1364. HideCursor
  1365. ----------------------------------------------------------------------
  1366.  
  1367. Description   Hides the cursor from view of the video display.
  1368.  
  1369. Summary       VOID HideCursor( VOID );
  1370.  
  1371. Remarks       This function turns on the fifth bit of the current 
  1372.               cursor size.
  1373.  
  1374. Example       See program example 
  1375.  
  1376. Source        hcursor.asm
  1377.  
  1378. ----------------------------------------------------------------------
  1379. InitVideo
  1380. ----------------------------------------------------------------------
  1381.  
  1382. Description   Initialize the video mode.
  1383.  
  1384. Summary       VOID InitVideo( Mode );
  1385.               INT        Mode            gives the video mode to 
  1386.                                          initial ize.
  1387.  
  1388. Remarks       To set the screen to the appropriate video mode use the 
  1389.               fol lowing  table as a guide.
  1390.  
  1391.               Mode   Type                  Colors   Adapter
  1392.                 0   Text - 40 x 25 B/W      b/w      CGA
  1393.                 1   Text - 40 x 25 COLOR     16      CGA
  1394.                 2   Text - 80 x 25 B/W      b/w      CGA
  1395.                 3   Text - 80 x 25 COLOR     16      CGA
  1396.                 4   Graphics - 320 x 200     4       CGA
  1397.                 5   Graphics - 320 x 200    4 grey   CGA
  1398.                 6   Graphics - 640 x 200     b/w     CGA
  1399.                 7   Text - 80 x 25           16      MDA
  1400.                 8   Graphics - 160 x 200     16      PCjr
  1401.                 9   Graphics - 320 x 200    4,64     PCjr
  1402.                10   Graphics - 640 x 200     16      PCjr,EGA
  1403.                13   Graphics - 320 x 200     16      EGA
  1404.                14   Graphics - 640 x 200     16      EGA
  1405.                15   Graphics - 640 x 350      4      EGA
  1406.  
  1407. Example       See program example 
  1408.  
  1409. Source        initvio.asm
  1410.  
  1411. ----------------------------------------------------------------------
  1412. PutFrameAttr
  1413. ----------------------------------------------------------------------
  1414.  
  1415. Description   Write the data in the buffer to the attribute byte in 
  1416.               the speci fied  area on the screen.
  1417.  
  1418. Summary       VOID PutFrameAttr( x1, y1,x2, y2, Buffer );
  1419.               INT        x1              left column of window.
  1420.               INT        y1              top row of window.
  1421.               INT        x2              right column of window.
  1422.               INT        y2              bottom row of window.
  1423.               CHAR       *Buffer         data buffer that contains 
  1424.                                          the information to display 
  1425.                                          on the screen.
  1426.  
  1427. See Also      GetFrameAttr, PutFrameCell, PutFrameChar
  1428.  
  1429. Example       See program example 
  1430.  
  1431. Source        pframbyt.asm
  1432.  
  1433. ----------------------------------------------------------------------
  1434. PutFrameCell
  1435. ----------------------------------------------------------------------
  1436.  
  1437. Description   Write the data in the buffer to the character and 
  1438.               attribute bytes in the specified area on the screen.
  1439.  
  1440. Summary       VOID PutFrameCell( x1, y1, x2, y2, Buffer );
  1441.               INT        x1              left column of window.
  1442.               INT        y1              top row of window.
  1443.               INT        x2              right column of window.
  1444.               INT        y2              bottom row of window.
  1445.               CHAR       *Buffer         data buffer that contains 
  1446.                                          the information to display 
  1447.                                          on the screen.
  1448.  
  1449. See Also      GetFrameCell, PutFrameAttr, PutFrameChar
  1450.  
  1451. Example       See program example 
  1452.  
  1453. Source        pframbyt.asm
  1454.  
  1455. ----------------------------------------------------------------------
  1456. PutFrameChar
  1457. ----------------------------------------------------------------------
  1458.  
  1459. Description   Write the data in the buffer to the character byte in 
  1460.               the specified area on the screen.
  1461.  
  1462. Summary       VOID PutFrameChar( x1, y1, x2, y2, Buffer );
  1463.               INT        x1              left column of window.
  1464.               INT        y1              top row of window.
  1465.               INT        x2              right column of window.
  1466.               INT        y2              bottom row of window.
  1467.               CHAR       *Buffer         data buffer that contains 
  1468.                                          the information to display 
  1469.                                          on the screen.
  1470.  
  1471. See Also      GetFrameChar, PutFrameAttr, PutFrameChar
  1472.  
  1473. Example       See program example 
  1474.  
  1475. Source        pframbyt.asm
  1476.  
  1477. ----------------------------------------------------------------------
  1478. PutScrn
  1479. ----------------------------------------------------------------------
  1480.  
  1481. Description   Displays the data in the buffer to the specified screen 
  1482.               posi tion in character attribute byte form.
  1483.  
  1484. Summary       VOID PutScrn( x, y, NWords, Buffer );
  1485.               INT        x               column to begin display of 
  1486.                                          screen data.
  1487.               INT        y               row to begin display of 
  1488.                                          screen data.
  1489.               INT        NWords          number of words to read from 
  1490.                                          the display screen.
  1491.               CHAR       *Buffer         data buffer to place the 
  1492.                                          screen information.
  1493.  
  1494. Remarks       This procedure provides additional checks for vertical 
  1495.               and horizontal retrace periods on a CGA video adapter.  
  1496.               This is to eliminate the snow effect that is produced 
  1497.               from direct moves to or from the video display.  These 
  1498.               checks may be turned o
  1499.  
  1500.               ff through the global variable CheckSnow.
  1501.  
  1502. See Also      GetScrn
  1503.  
  1504. Example       See program example 
  1505.  
  1506. Source        pscrn.asm
  1507.  
  1508. ----------------------------------------------------------------------
  1509. RvsAttr
  1510. ----------------------------------------------------------------------
  1511.  
  1512. Description   Reverses the video attribute byte passed.
  1513.  
  1514. Summary       INT RvsAttr( Attr );
  1515.               INT        Attr            value in the range 0-255 
  1516.                                          giving the screen color to 
  1517.                                          be reversed.
  1518.  
  1519. Remarks       RvsAttr exchanges the three foreground and background 
  1520.               attribute bits of the parameter value passed in.  The 
  1521.               blink and intensity bits of the byte remain unchanged.
  1522.  
  1523. Example       See program example 
  1524.  
  1525. Source        rvsattr.asm
  1526.  
  1527. ----------------------------------------------------------------------
  1528. ScrollDown
  1529. ----------------------------------------------------------------------
  1530.  
  1531. Description   Scroll the specified portion of the screen down N lines 
  1532.               filling in new lines with spaces and the specified 
  1533.               attribute.
  1534.  
  1535. Summary       VOID ScrollDown( x1, y1, x2, y2, Attr, NRows );
  1536.               INT        x1              left column of window.
  1537.               INT        y1              top row of window.
  1538.               INT        x2              right column of window.
  1539.               INT        y2              bottom row of window.
  1540.               INT        Attr            value in the range 0-255. It 
  1541.                                          defines the display          
  1542.                                              attribute to be used 
  1543.                                          when filling in the blank 
  1544.                                          lines at the top of the 
  1545.                                          window.
  1546.               INT        NRows           number of lines the 
  1547.                                          specified portion of the 
  1548.                                          screen is to be scrolled.
  1549.  
  1550. Remarks       If you use a value of zero for the number of lines to 
  1551.               scroll, the window area defined by the x1,y1,x2,y2 
  1552.               coordinates will be cleared to the color defined by the 
  1553.               Attribute variable.
  1554.  
  1555. See Also      ScrollLeft, ScrollRight, ScrollUp
  1556.  
  1557. Example       See program example 
  1558.  
  1559. Source        scrollvt.asm
  1560.  
  1561. ----------------------------------------------------------------------
  1562. ScrollLeft
  1563. ----------------------------------------------------------------------
  1564.  
  1565. Description   Scroll the specified portion of the screen left N 
  1566.               columns fill ing in new columns with spaces and the 
  1567.               specified attribute.
  1568.  
  1569. Summary       VOID ScrollLeft( x1, y1, x2, y2, Attr, NCols );
  1570.               INT        x1              left column of window.
  1571.               INT        y1              top row of window.
  1572.               INT        x2              right column of window.
  1573.               INT        y2              bottom row of window.
  1574.               INT        Attr            value in the range 0-255. It 
  1575.                                          defines the display          
  1576.                                              attribute to be used 
  1577.                                          when filling in the 
  1578.                                          blankcolumns on the right 
  1579.                                          side of the window.
  1580.               INT        NCols           number of columns the speci 
  1581.                                          fied portion of the screen 
  1582.                                          is to be scrolled.
  1583.  
  1584. Remarks       If a value of zero for the number of lines to scroll is 
  1585.               used, the window area defined by the x1,y1,x2,y2 
  1586.               coordinates will be cleared to the color defined by the 
  1587.               Attribute variable.
  1588.  
  1589. See Also      ScrollDown, ScrollRight, ScrollUp
  1590.  
  1591. Example       See program example 
  1592.  
  1593. Source        scrolllt.asm
  1594.  
  1595. ----------------------------------------------------------------------
  1596. ScrollRight
  1597. ----------------------------------------------------------------------
  1598.  
  1599. Description   Scroll the specified portion of the screen right N 
  1600.               columns fill ing in new columns with spaces and the 
  1601.               specified attribute.
  1602.  
  1603. Summary       VOID ScrollRight( x1, y1, x2, y2, Attr, NCols );
  1604.               INT        x1              left column of window.
  1605.               INT        y1              top row of window.
  1606.               INT        x2              right column of window.
  1607.               INT        y2              bottom row of window.
  1608.               INT        Attr            value in the range 0-255.  
  1609.                                          It defines the display       
  1610.                                                 attribute to be used 
  1611.                                          when filling in the blank 
  1612.                                          columns on the left side of 
  1613.                                          the window.
  1614.               INT        NCols           number of columns the speci 
  1615.                                          fied portion of the screen 
  1616.                                          is to be scrolled.
  1617.  
  1618. Remarks       If you use a value of zero for the number of lines to 
  1619.               scroll, the window area defined by the x1,y1,x2,y2 
  1620.               coordinates will be cleared to the color defined by the 
  1621.               Attribute variable.
  1622.  
  1623. See Also      ScrollDown, ScrollLeft, ScrollUp
  1624.  
  1625. Example       See program example 
  1626.  
  1627. Source        scrollrt.asm
  1628.  
  1629. ----------------------------------------------------------------------
  1630. ScrollUp
  1631. ----------------------------------------------------------------------
  1632.  
  1633. Description   Scroll the specified portion of the screen up N lines 
  1634.               filling in new lines with spaces and the specified 
  1635.               attribute.
  1636.  
  1637. Summary       VOID ScrollUp( x1, y1, x2, y2, Attr, NRows );
  1638.               INT        x1              left column of window.
  1639.               INT        y1              top row of window.
  1640.               INT        x2              right column of window.
  1641.               INT        y2              bottom row of window.
  1642.               INT        Attr            value in the range 0-255. It 
  1643.                                          defines the display          
  1644.                                              attribute to be used 
  1645.                                          when filling in the blank 
  1646.                                          lines at the bottom of the 
  1647.                                          window.
  1648.               INT        NRows           number of lines the 
  1649.                                          specified portion of the 
  1650.                                          screen is to be scrolled.
  1651.  
  1652. Remarks       If you use a value of zero for the number of lines to 
  1653.               scroll, the window area defined by the x1,y1,x2,y2 
  1654.               coordinates will be cleared to the color defined by the 
  1655.               Attribute variable.
  1656.  
  1657. See Also      ScrollDown, ScrollLeft, ScrollRight
  1658.  
  1659. Example       See program example 
  1660.  
  1661. Source        scrollvt.asm
  1662.  
  1663. ----------------------------------------------------------------------
  1664. SetCursorSize
  1665. ----------------------------------------------------------------------
  1666.  
  1667. Description   Set the size of the cursor.
  1668.  
  1669. Summary       VOID SetCursorSize( StScan, SpScan );
  1670.               INT        StScan          starting scan line to be 
  1671.                                          used for the cursor.
  1672.               INT        SpScan          ending scan line to be used 
  1673.                                          for the cursor.
  1674.  
  1675. Remarks       The scan lines are numbered from zero at the top 
  1676.               (StScan) to N at  the bottom (SpScan) where N applies 
  1677.               to the follow ing video adapters:
  1678.  
  1679.                  7  - Color/Graphics Adapter
  1680.                  14 - Monochrome Adapter
  1681.  
  1682.               - 0 --
  1683.               - 1   |
  1684.               - 2   |
  1685.               - 3   |---> Scan lines for a Color/Graphics
  1686.               - 4   |     display adapter.
  1687.               - 5   |
  1688.               - 6   |
  1689.               - 7 --
  1690.  
  1691. See Also      GetCursorSize
  1692.  
  1693. Example       See program example 
  1694.  
  1695. Source        scursize.asm
  1696.  
  1697. ----------------------------------------------------------------------
  1698. SetVideoPage
  1699. ----------------------------------------------------------------------
  1700.  
  1701. Description   Set the active display page.
  1702.  
  1703. Summary       VOID SetVideoPage( PageNo );
  1704.               INT        PageNo          active display page to use.
  1705.  
  1706. Remarks       Active display pages available for various display 
  1707.               cards.
  1708.  
  1709.               0     - Monochrome
  1710.               0-7  - Color/Graphics 40 column text mode
  1711.               0-3  - Color/Graphics 80 column text mode
  1712.               0     - Color/Graphics Hi Resolution Graphics mode
  1713.  
  1714. See Also      GetVideoPage
  1715.  
  1716. Example       See program example 
  1717.  
  1718. Source        sviopage.asm
  1719.  
  1720. ----------------------------------------------------------------------
  1721. ShowCursor
  1722. ----------------------------------------------------------------------
  1723.  
  1724. Description   Shows the cursor on the video display.
  1725.  
  1726. Summary       VOID ShowCursor( VOID );
  1727.  
  1728. Remarks       This function turns off the fifth bit of the current 
  1729.               cursor size.
  1730.  
  1731. Example       See program example 
  1732.  
  1733. Source        scursor.asm
  1734.  
  1735. ----------------------------------------------------------------------
  1736. VioInit
  1737. ----------------------------------------------------------------------
  1738.  
  1739. Description   Initializes the Video units global variables.
  1740.  
  1741. Summary       VOID VioInit( VOID );
  1742.  
  1743. Remarks       This function must be executed once before any video 
  1744.               func tions can be used.  If at some time you wish to 
  1745.               reset the global variables to their default settings 
  1746.               you may use this procedure to complete that task.
  1747.  
  1748. Example       See program examples 2-7
  1749.  
  1750. Source        vioinit.asm
  1751.  
  1752. ----------------------------------------------------------------------
  1753. WhereXAbs
  1754. ----------------------------------------------------------------------
  1755.  
  1756. Description   Returns the column the cursor is in.
  1757.  
  1758. Summary       INT WhereXAbs( VOID );
  1759.  
  1760. Remarks       This function will return an integer giving the column 
  1761.               number the cursor is on.  This routine is not sensitive 
  1762.               to the currently defined window.
  1763.  
  1764. See Also      GotoxyAbs, WhereYAbs
  1765.  
  1766. Example       See program example 
  1767.  
  1768. Source        wherexab.asm
  1769.  
  1770. ----------------------------------------------------------------------
  1771. WhereYAbs
  1772. ----------------------------------------------------------------------
  1773.  
  1774. Description   Returns the row the cursor is on.
  1775.  
  1776. Summary       INT WhereYAbs( VOID );
  1777.  
  1778. Remarks       This function will return an integer giving the row 
  1779.               number the cursor is on.  This routine is not sensitive 
  1780.               to the currently defined window.
  1781.  
  1782. See Also      GotoxyXAbs, WhereXAbs
  1783.  
  1784. Example       See program example 
  1785.  
  1786. Source        whereyab.asm
  1787.  
  1788. ----------------------------------------------------------------------
  1789. WindowFP
  1790. ----------------------------------------------------------------------
  1791.  
  1792. Description   Set the window coordinate variables WindMin and 
  1793.               WindMax.
  1794.  
  1795. Summary       VOID WindowFP( x1, y1, x2, y2 );
  1796.               INT        x1              left column of window.
  1797.               INT        y1              top row of window.
  1798.               INT        x2              right column of window.
  1799.               INT        y2              bottom row of window.
  1800.  
  1801. Remarks       This function sets the window coordinates in the 
  1802.               WindMin and WindMax global variables which FrameWin 
  1803.               uses for framing windows on the display screen.
  1804.  
  1805. See Also      FrameWin
  1806.  
  1807. Example       See program example 3-7
  1808.  
  1809. Source        windowfp.asm
  1810.  
  1811. ----------------------------------------------------------------------
  1812. WriteSt
  1813. ----------------------------------------------------------------------
  1814.  
  1815. Description   Display a string on the screen
  1816.  
  1817. Summary       VOID WriteSt( String );
  1818.               CHAR       *Sting          string expression to display 
  1819.                                          on screen.
  1820.  
  1821. Remarks       WriteSt positions the cursor after the newly displayed 
  1822.               string.  WriteSt is NOT sensitive to the currently 
  1823.               defined window and will wrap around to the next row of 
  1824.               column one of the physi cal screen when necessary. 
  1825.               WriteSt will not scroll the sc
  1826.  
  1827.               reen if the data to be displayed is to extend beyond 
  1828.               the last row of the screen.  WriteSt uses the attribute 
  1829.               byte defined by the global variable TextAttr.
  1830.  
  1831. See Also      WriteStLn
  1832.  
  1833. Example       See program example 3
  1834.  
  1835. Source        wrtst.asm
  1836.  
  1837. ----------------------------------------------------------------------
  1838. WriteStln
  1839. ----------------------------------------------------------------------
  1840.  
  1841. Description   Display a string on the screen
  1842.  
  1843. Summary       VOID WriteStln( String );
  1844.               CHAR       *Sting          string expression to display 
  1845.                                          on screen.
  1846.  
  1847. Remarks       WriteStln positions the cursor in column one on the 
  1848.               next line of the display screen after the data has been 
  1849.               displayed.  WriteStln is NOT sensitive to the currently 
  1850.               defined window and will wrap around to the next row of 
  1851.               column one of the physi
  1852.  
  1853.               cal screen when necessary.  WriteStln will not scroll 
  1854.               the screen if the data to be displayed is to extend 
  1855.               beyond the last row of the screen.  WriteStln uses the 
  1856.               attribute byte defined by the global variable TextAttr.
  1857.  
  1858. See Also      WriteSt
  1859.  
  1860. Example       See program example 3
  1861.  
  1862. Source        wrtstln.asm
  1863.  
  1864.  
  1865.  
  1866.                                Chapter 4
  1867.                               BIOS Video
  1868.  
  1869.                   +--------------------------------+
  1870.                   |                                |
  1871.                   |   This section supports video  |
  1872.                   |         BIOS functions.        |
  1873.                   |                                |
  1874.                   | Thank-you for supporting the   |
  1875.                   |        FlashPac Library        |
  1876.                   |                                |
  1877.                   +--------------------------------+
  1878.  
  1879. ----------------------------------------------------------------------
  1880. bvCurEmulation        [VGA]
  1881. ----------------------------------------------------------------------
  1882.  
  1883. Description   Enables or disables cursor emulation for the currently 
  1884.               active display. When cursor emulation is enabled, the 
  1885.               ROM BIOS automatically remaps INT 10H Function 01H 
  1886.               cursor starting scan and ending scan lines for the 
  1887.               current character cell 
  1888.  
  1889.  
  1890. dimensions.
  1891. Summary       INT2 bvCurEmulation( setting );
  1892.               INT2       setting         0 - enables emulation
  1893.                                          1 - disable emulation
  1894.  
  1895. Returns       12h - if function is supported.
  1896.  
  1897. Example       See program example 
  1898.  
  1899. Source        b101234d.asm
  1900.  
  1901. ----------------------------------------------------------------------
  1902. bvDefPalLoad        [MCGA][VGA]
  1903. ----------------------------------------------------------------------
  1904.  
  1905. Description   Enables or disables loading of a default palette when a 
  1906.               video display mode is selected.
  1907.  
  1908. Summary       INT2 bvDefPalLoad( setting );
  1909.               INT2       setting         0 - enables default palette 
  1910.                                          load ing
  1911.                                          1 - disable default palette 
  1912.                                          load ing
  1913.  
  1914. Returns       12h - if function is supported.
  1915.  
  1916. Example       See program example 
  1917.  
  1918. Source        b101231d.asm
  1919.  
  1920. ----------------------------------------------------------------------
  1921. bvGetBorder        [VGA]
  1922. ----------------------------------------------------------------------
  1923.  
  1924. Description   Obtain current color of the border.
  1925.  
  1926. Summary       INT2 bvGetBorder( VOID );
  1927.  
  1928. Returns       The attribute value of the border color.
  1929.  
  1930. Example       See program example
  1931.  
  1932. Source        b101008d.asm
  1933.  
  1934. ----------------------------------------------------------------------
  1935. bvGetColorPgMode    [VGA]
  1936. ----------------------------------------------------------------------
  1937.  
  1938. Description   Gets paging mode for specified color registers and the 
  1939.               cur rent  color page.
  1940.  
  1941. Summary       VOID bvGetColorPgMode( colorpg, pgmode );
  1942.               INT2       *colorpg        color page to get 
  1943.                                          information on
  1944.               INT2       *pgmode         00 - if 4 pages of 64 
  1945.                                          registers
  1946.                                          01 - if 16 pages of 16 
  1947.                                          registers
  1948.  
  1949. See Also      bvSetColorPgMode
  1950.  
  1951. Example       See program example 
  1952.  
  1953. Source        b10101ad.asm
  1954.  
  1955. ----------------------------------------------------------------------
  1956. bvGetColorReg        [MCGA][VGA]
  1957. ----------------------------------------------------------------------
  1958.  
  1959. Description   Sets paging mode for color registers
  1960.  
  1961. Summary       VOID bvGetColorReg( colorreg, green, blue, red );
  1962.               INT2       colorreg        color register
  1963.               INT2       *green          green color value
  1964.               INT2       *blue           blue color value
  1965.               INT2       *red            red color value
  1966.  
  1967. Example       See program example 
  1968.  
  1969. Source        b101015d.asm
  1970.  
  1971. ----------------------------------------------------------------------
  1972. bvGetColorRegBlk    [MCGA][VGA]
  1973. ----------------------------------------------------------------------
  1974.  
  1975. Description   Reads the set of red, green and blue colors associated 
  1976.               with  each set of color registers.
  1977.  
  1978. Summary       VOID bvGetColorRegBlk( startreg, regcount, colortbl );
  1979.               UINT2      startreg        first color register
  1980.               INT2       regcount        number of registers
  1981.               INT2       colortbl[][3]   color table consists of 3 
  1982.                                          bytes for each register. 
  1983.                                          Each group of 3 bytes will 
  1984.                                          specify the red, green, and 
  1985.                                          blue values, respec tively 
  1986.                                          for the associated register.
  1987.  
  1988. Example       See program example 
  1989.  
  1990. Source        b101017d.asm
  1991.  
  1992. ----------------------------------------------------------------------
  1993. bvGetConfigInfo        [EGA][VGA]
  1994. ----------------------------------------------------------------------
  1995.  
  1996. Description   Returns configuration information for the active video 
  1997.               sys tem.
  1998.  
  1999. Summary       VOID bvGetConfigInfo( dsptype, egamem, fbits, swset );
  2000.               INT2       *dsptype        0 - color
  2001.                                          1 - monochrome
  2002.               INT2       *egamem         0 - 64K
  2003.                                          1 - 128K
  2004.                                          2 - 192K
  2005.                                          3 - 256K
  2006.               INT2       *fbits          feature bits
  2007.               INT2       *swset          switch setting
  2008.  
  2009. Remarks       The feature bits are set from input status register 
  2010.               zero in response to an output on the specified feature 
  2011.               control regis ter bits:
  2012.  
  2013.               Feature   Feature control   Input Status
  2014.               Bit(s)        Output Bit           Bit               
  2015.                  0            0                5
  2016.                  1            0                6
  2017.                  2            1                5
  2018.                  3            1                6
  2019.                  4-7         not used
  2020.  
  2021.               The bits in the switch settings byte indicate the state 
  2022.               of the EGA's configuration DIP switch (1=off, 0=on).
  2023.  
  2024.               Bit    Significance
  2025.               0      configuration switch 1
  2026.               1      configuration switch 2
  2027.               2      configuration switch 3
  2028.               3      configuration switch 4
  2029.               4-7    not used
  2030.  
  2031. Example       See program example 
  2032.  
  2033. Source        b101210d.asm
  2034.  
  2035. ----------------------------------------------------------------------
  2036. bvGetCurPos        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2037. ----------------------------------------------------------------------
  2038.  
  2039. Description   Returns the current position of the cursor on the 
  2040.               display.
  2041.  
  2042. Summary       VOID bvGetCurPos( pg, row, col );
  2043.               INT2       pg              page to get cursor position 
  2044.                                          for
  2045.               INT2       *row            row (y coordinate)
  2046.               INT2       *col            col (x coordinate)
  2047.  
  2048. Example       See program example 
  2049.  
  2050. Source        b100300d.asm
  2051.  
  2052. ----------------------------------------------------------------------
  2053. bvGetCurType        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2054. ----------------------------------------------------------------------
  2055.  
  2056. Description   Returns starting and ending scan lines for the cursor 
  2057.               in text modes.
  2058.  
  2059. Summary       VOID bvGetCurType( pg, stscan, spscan );
  2060.               INT2       pg              page to get cursor position 
  2061.                                          for
  2062.               INT2       *stscan         starting scan line for 
  2063.                                          cursor
  2064.               INT2       *spscan         ending scan line for cursor
  2065.  
  2066. Example       See program example 
  2067.  
  2068. Source        b1003x0d.asm
  2069.  
  2070. ----------------------------------------------------------------------
  2071. bvGetFontInfo        [EGA] [MCGA] [VGA]
  2072. ----------------------------------------------------------------------
  2073.  
  2074. Description   Returns a pointer to the character definition table for 
  2075.               a font, and the bytes per character and rows for that 
  2076.               font.
  2077.  
  2078. Summary       VOID bvGetFontInfo( fontcode, points, scnrows, fonttbl 
  2079.               );
  2080.               INT2       fontcode        defines font table to 
  2081.                                          retrieve information on
  2082.               UINT2      *points         bytes per character
  2083.               INT2       *scnrows        rows per screen
  2084.               VOID       *fonttbl        address of font table 
  2085.                                          requested
  2086.  
  2087. Remarks       Font
  2088.               Code   Description                                                 
  2089.                
  2090.                     00   current Int 1FH contents
  2091.                     01   current Int 43H contents
  2092.                     02   ROM 8x14 font (EGA, VGA only)
  2093.                     03   ROM 8x8 font (characters 00H-7FH)
  2094.                     04   ROM 8x8 font (characters 80H-FFH)
  2095.                     05   ROM alternate 9x14 font (EGA, VGA only)
  2096.                     06   ROM 8x16 font (MCGA, VGA only)
  2097.                     07   ROM alternate 9x16 font (VGA only)
  2098.  
  2099. Example       See program example 
  2100.  
  2101. Source        b101130d.asm
  2102.  
  2103. ----------------------------------------------------------------------
  2104. bvGetMode        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2105. ----------------------------------------------------------------------
  2106.  
  2107. Description   Return current display mode, active page and number of 
  2108.               columns for the active display page.
  2109.  
  2110. Summary       VOID bvGetMode( mode, cols, pg );
  2111.               INT2       *mode           current display mode
  2112.               INT2       *cols           number of column on page
  2113.               INT2       *pg             active display page
  2114.  
  2115. Example       See program example 
  2116.  
  2117. Source        b100f00d.asm
  2118.  
  2119. ----------------------------------------------------------------------
  2120. bvGetPalBorder        [VGA]
  2121. ----------------------------------------------------------------------
  2122.  
  2123. Description   Obtain contents of all palette registers and color of 
  2124.               border.
  2125.  
  2126. Summary       VOID bvGetPalBorder( buf );
  2127.               CHAR       buf[17]         Bytes 00-0Fh will contain 
  2128.                                          the
  2129.               palette    values.         Byte 10h will contain the 
  2130.                                          border color.
  2131.  
  2132. Example       See program example 
  2133.  
  2134. Source        b101009d.asm
  2135.  
  2136. ----------------------------------------------------------------------
  2137. bvGetPalReg        [VGA]
  2138. ----------------------------------------------------------------------
  2139.  
  2140. Description   Return the color associated with the specified register 
  2141.                pal ette.
  2142.  
  2143. Summary       INT2 bvGetPalReg( reg );
  2144.               INT2       reg             return the color for this 
  2145.                                          palette register.
  2146.  
  2147. Returns       Color for the specified palette register.
  2148.  
  2149. Example       See program example 
  2150.  
  2151. Source        b101007d.asm
  2152.  
  2153. ----------------------------------------------------------------------
  2154. bvGrayScaleSum        [MCGA] [VGA]
  2155. ----------------------------------------------------------------------
  2156.  
  2157. Description   Enables or disables gray-scale summing for active 
  2158.               display.
  2159.  
  2160. Summary       INT2 bvGrayScaleSum( setting );
  2161.               INT2       setting         0 - enables access
  2162.                                          1 - disable access
  2163.               Return     12h             is returned if this function 
  2164.                                          is supported.
  2165.  
  2166. Example       See program example 
  2167.  
  2168. Source        b101233d.asm
  2169.  
  2170. ----------------------------------------------------------------------
  2171. bvLoad8x14Font01    [EGA] [VGA]
  2172. ----------------------------------------------------------------------
  2173.  
  2174. Description   Provides the default 8x14 font table in text modes.
  2175.  
  2176. Summary       VOID bvLoad8x14Font01( block );
  2177.               INT2       block           specifies the block of 
  2178.                                          character generator RAM.  (0 
  2179.                                          or 1).
  2180.  
  2181. Remarks       If this function is used on an MCGA then the BIOS will 
  2182.               execute the function bvLoad8x16Font04.
  2183.  
  2184. Example       See program example 
  2185.  
  2186. Source        b101101d.asm
  2187.  
  2188. ----------------------------------------------------------------------
  2189. bvLoad8x14Font11    [EGA] [VGA]
  2190. ----------------------------------------------------------------------
  2191.  
  2192. Description   Provides the default 8x14 font table in text modes.
  2193.  
  2194. Summary       VOID bvLoad8x14Font11( block );
  2195.               INT2       block           specifies the block of 
  2196.                                          character generator RAM.  (0 
  2197.                                          or 1).
  2198.  
  2199. Remarks       Page zero must be active and if this function is used 
  2200.               at any other time than immediately after a set mode, 
  2201.               the results will be unpredictable.
  2202.  
  2203.               If this function is used on an MCGA then the BIOS will 
  2204.               execute the function bvLoad8x16Font04.
  2205.  
  2206. Example       See program example 
  2207.  
  2208. Source        b101101d.asm
  2209.  
  2210. ----------------------------------------------------------------------
  2211. bvLoad8x16Font04    [MCGA] [VGA]
  2212. ----------------------------------------------------------------------
  2213.  
  2214. Description   Provides the default 8x16 font table in text modes.
  2215.  
  2216. Summary       VOID bvLoad8x16Font04( block );
  2217.               INT2       block           specifies the block of 
  2218.                                          character generator RAM.
  2219.  
  2220. Remarks       On a MCGA, a call to this function should be followed 
  2221.               with a call to bvSetBlkSpec.
  2222.  
  2223. Example       See program example 
  2224.  
  2225. Source        b101104d.asm
  2226.  
  2227. ----------------------------------------------------------------------
  2228. bvLoad8x16Font14    [MCGA] [VGA]
  2229. ----------------------------------------------------------------------
  2230.  
  2231. Description   Provides the default 8x16 font table in text modes.
  2232.  
  2233. Summary       VOID bvLoad8x16Font14( block );
  2234.               INT2       block           specifies the block of 
  2235.                                          character generator RAM.
  2236.  
  2237. Remarks       Page zero must be active and if this function is used 
  2238.               at any other time than immediately after a set mode, 
  2239.               the results will be unpredictable.
  2240.  
  2241.               If this function is used on an MCGA then the BIOS will 
  2242.               execute the function bvLoad8x16Font04.
  2243.  
  2244. Example       See program example 
  2245.  
  2246. Source        b101104d.asm
  2247.  
  2248. ----------------------------------------------------------------------
  2249. bvLoad8x8Font02    [EGA] [MCGA] [VGA]
  2250. ----------------------------------------------------------------------
  2251.  
  2252. Description   Provides the default 8x8 font table in text modes.
  2253.  
  2254. Summary       VOID bvLoad8x8Font02( block );
  2255.               INT2       block           specifies the block of 
  2256.                                          character generator RAM.
  2257.  
  2258. Remarks       On a MCGA, a call to this function should be followed 
  2259.               with a call to bvSetBlkSpec.
  2260.  
  2261. Example       See program example 
  2262.  
  2263. Source        b101102d.asm
  2264.  
  2265. ----------------------------------------------------------------------
  2266. bvLoad8x8Font12    [EGA] [MCGA] [VGA]
  2267. ----------------------------------------------------------------------
  2268.  
  2269. Description   Provides the default 8x8 font table in text modes.
  2270.  
  2271. Summary       VOID bvLoad8x8Font12( block );
  2272.               INT2       block           specifies the block of 
  2273.                                          character generator RAM.
  2274.  
  2275. Remarks       Page zero must be active and if function is used at any 
  2276.               other  time than immediately after a set mode, the 
  2277.               results will be unpredictable.  If this function is 
  2278.               used on an MCGA then the BIOS will execute the function 
  2279.               bvLoad8x16Font02.
  2280.  
  2281. Example       See program example 
  2282.  
  2283. Source        b101102d.asm
  2284.  
  2285. ----------------------------------------------------------------------
  2286. bvLoadUsrFont00    [EGA] [MCGA] [VGA]
  2287. ----------------------------------------------------------------------
  2288.  
  2289. Description   Loads the users text font table into the specified 
  2290.               block of character generator RAM.
  2291.  
  2292. Summary       VOID bvLoadUsrFont00( pts, block, chcnt, startch, 
  2293.               fonttbl );
  2294.               INT2       pts             bytes per character
  2295.               INT2       block           specifies block of character 
  2296.                                          generator RAM.
  2297.               UINT2      chcnt           characters in table
  2298.               UINT2      startch         first character in table
  2299.               VOID       *fonttbl        font table address
  2300.  
  2301. Remarks       On a MCGA, a call to this function should be followed 
  2302.               with a call to bvSetBlkSpec.
  2303.  
  2304. Example       See program example 
  2305.  
  2306. Source        b101100d.asm
  2307.  
  2308. ----------------------------------------------------------------------
  2309. bvLoadUsrFont10    [EGA] [MCGA] [VGA]
  2310. ----------------------------------------------------------------------
  2311.  
  2312. Description   Loads the users text font table into specified block of 
  2313.               char acter generator RAM.
  2314.  
  2315. Summary       VOID bvLoadUsrFont10( pts, block, chcnt, startch, 
  2316.               fonttbl );
  2317.               INT2       pts             bytes per character
  2318.               INT2       block           specifies block of character 
  2319.                                          generator RAM.
  2320.               UINT2      chcnt           characters in table
  2321.               UINT2      startch         first character in table
  2322.               VOID       *fonttbl        font table address
  2323.  
  2324. Remarks       Page zero must be active and if this function is used 
  2325.               at any  other time than immediately after a set mode, 
  2326.               the results will be unpredictable.
  2327.  
  2328.               If this function is used on an MCGA then the BIOS will 
  2329.               execute  the function bvLoadUsrFont00.
  2330.  
  2331. Example       See program example 
  2332.  
  2333. Source        b101100d.asm
  2334.  
  2335. ----------------------------------------------------------------------
  2336. bvReadCell        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2337. ----------------------------------------------------------------------
  2338.  
  2339. Description   Read the cell the cursor is positioned on for its 
  2340.               character and attribute values.
  2341.  
  2342. Summary       VOID bvReadCell( ch, attr, pg );
  2343.               INT2       *ch             will contain the character 
  2344.                                          of the cell.
  2345.               INt2       *attr           will contain the attribute 
  2346.                                          value of the cell.
  2347.               INT2       *pg             the page the cell to read is 
  2348.                                          on.
  2349.  
  2350. Remarks       The page to read from does not have to be the active 
  2351.               page, if the video display supports multiple pages.
  2352.  
  2353. Example       See program example 
  2354.  
  2355. Source        b100800d.asm
  2356.  
  2357. ----------------------------------------------------------------------
  2358. bvReadPix        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2359. ----------------------------------------------------------------------
  2360.  
  2361. Description   Read pixel from the specified graphics coordinates.
  2362.  
  2363. Summary       INT2 bvReadPix( row, col, pg );
  2364.               INT2       row             row for pixel to be read 
  2365.                                          from
  2366.               INT2       col             col for pixel to be read 
  2367.                                          from
  2368.               INT2       pg              page to read pixel from
  2369.  
  2370. Returns       The pixel value at for the coordinates requested.
  2371.  
  2372. Example       See program example 
  2373.  
  2374. Source        b100d00d.asm
  2375.  
  2376. ----------------------------------------------------------------------
  2377. bvScnRefresh        [VGA]
  2378. ----------------------------------------------------------------------
  2379.  
  2380. Description   Enables or disables the video refresh for the currently 
  2381.               active display.
  2382.  
  2383. Summary       INT2 bvScnRefresh( setting );
  2384.  
  2385.               INT2       setting         0 - enables refresh
  2386.                                          1 - disable refresh
  2387.  
  2388. Returns       12h is returned if this function is supported.
  2389.  
  2390. Example       See program example 
  2391.  
  2392. Source        b101236d.asm
  2393.  
  2394. ----------------------------------------------------------------------
  2395. bvScrollDn        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2396. ----------------------------------------------------------------------
  2397.  
  2398. Description   Scrolls the contents of the window on the active 
  2399.               display page down by the specified number of lines.
  2400.  
  2401. Summary       VOID bvScrollDn( top, left, bottom, right, lines, attr 
  2402.               );
  2403.               INT2       top             top row of window
  2404.               INT2       left            left column of window
  2405.               INT2       bottom          bottom row of window
  2406.               INT2       right           right column of window
  2407.               INT2       lines           number of lines to scroll
  2408.               INT2       attr            attribute to use for blanked 
  2409.                                          area
  2410.  
  2411. Remarks       If the number of lines to scroll is zero, the entire 
  2412.               window will be blanked.
  2413.  
  2414. Example       See program example 
  2415.  
  2416. Source        b1006xxd.asm
  2417.  
  2418. ----------------------------------------------------------------------
  2419. bvScrollUp        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2420. ----------------------------------------------------------------------
  2421.  
  2422. Description   Scrolls the contents of the window on the active 
  2423.               display page up by the specified number of lines.
  2424.  
  2425. Summary       VOID bvScrollUp( top, left, bottom, right, lines, attr 
  2426.               );
  2427.               INT2       top             top row of window
  2428.               INT2       left            left column of window
  2429.               INT2       bottom          bottom row of window
  2430.               INT2       right           right column of window
  2431.               INT2       lines           number of lines to scroll
  2432.               INT2       attr            attribute to use for blanked 
  2433.                                          area
  2434.  
  2435. Remarks       If the number of lines to scroll is zero, the entire 
  2436.               window will be blanked.
  2437.  
  2438. Example       See program example 
  2439.  
  2440. Source        b1006xxd.asm
  2441.  
  2442. ----------------------------------------------------------------------
  2443. bvSet1FhFontPtr    [EGA] [MCGA] [VGA]
  2444. ----------------------------------------------------------------------
  2445.  
  2446. Description   Sets the Int 1Fh pointer to the user's font table. The 
  2447.               table is used for character codes 80H-FFH) in graphics 
  2448.               modes 04H-06H.
  2449.  
  2450. Summary       VOID bvSet1FhFontPtr( fonttbl );
  2451.               VOID       *fonttbl        pointer to the font table
  2452.  
  2453. Remarks       If this function is used at any other time than 
  2454.               immediately after a set mode, the results will be 
  2455.               unpredictable.
  2456.  
  2457. Example       See program example 
  2458.  
  2459. Source        b101120d.asm
  2460.  
  2461. ----------------------------------------------------------------------
  2462. bvSet43h8x14Font    [EGA] [MCGA] [VGA]
  2463. ----------------------------------------------------------------------
  2464.  
  2465. Description   Sets the vector for Int 43h to point to the ROM BIOS 
  2466.               default 8x14 font and updates the video ROM BIOS data 
  2467.               area.
  2468.  
  2469. Summary       VOID bvSet43h8x14Font( spec, scnrows );
  2470.               INT2       spec            must be a value from 0-3 to 
  2471.                                          specify the number of 
  2472.                                          character rows on the 
  2473.                                          screen.
  2474.  
  2475.               Specifier  Descriptionx14Font(spec,  scnrows );
  2476.               00         use             scnrows var
  2477.               01         14              rows
  2478.               02         25              rows
  2479.               03         43              rows
  2480.  
  2481.               INT2       scnrows         number of rows per screen 
  2482.                                          when spec(ifier) is zero.
  2483.  
  2484. Remarks       If this function is used at any other time than 
  2485.               immediately after a set mode, the results will be 
  2486.               unpredictable.  When this function is used on the MCGA, 
  2487.               the BIOS substitutes function call bvSet43h8x16Font.
  2488.  
  2489. Example       See program example 
  2490.  
  2491. Source        b101122d.asm
  2492.  
  2493. ----------------------------------------------------------------------
  2494. bvSet43h8x16Font    [MCGA] [VGA]
  2495. ----------------------------------------------------------------------
  2496.  
  2497. Description   Sets the vector for Int 43h to point to the ROM BIOS 
  2498.               default  8x16 font and updates the video ROM BIOS data 
  2499.               area.
  2500.  
  2501. Summary       VOID bvSet43h8x16Font( spec, scnrows );
  2502.               INT2       spec            must be a value from 0-3 to 
  2503.                                          specify the number of 
  2504.                                          character rows on the 
  2505.                                          screen.
  2506.  
  2507.               Specifier  Descriptionx16Font(spec,  scnrows );
  2508.               00         use             scnrows var
  2509.               01         14              rows
  2510.               02         25              rows
  2511.               03         43              rows
  2512.  
  2513.               INT2       scnrows         number of rows per screen 
  2514.                                          when spec(ifier) is zero.
  2515.  
  2516. Remarks       If this function is used at any other time than 
  2517.               immediately after a set mode, the results will be 
  2518.               unpredictable.
  2519.  
  2520. Example       See program example 
  2521.  
  2522. Source        b101124d.asm
  2523.  
  2524. ----------------------------------------------------------------------
  2525. bvSet43h8x8Font        [EGA] [MCGA] [VGA]
  2526. ----------------------------------------------------------------------
  2527.  
  2528. Description   Sets the vector for Int 43h to point to the ROM BIOS 
  2529.               default  8x8 font and updates the video ROM BIOS data 
  2530.               area.
  2531.  
  2532. Summary       VOID bvSet43h8x8Font( spec, scnrows );
  2533.               INT2       spec            must be a value from 0-3 to 
  2534.                                          specify the number of 
  2535.                                          character rows on the 
  2536.                                          screen.
  2537.  
  2538.               Specifier  Descriptionx8Font(spec,  scnrows );
  2539.               00         use             scnrows var
  2540.               01         14              rows
  2541.               02         25              rows
  2542.               03         43              rows
  2543.  
  2544.               INT2       scnrows         number of rows per screen 
  2545.                                          when spec(ifier) is zero.
  2546.  
  2547. Remarks       If this function is used at any other time than 
  2548.               immediately after a set mode, the results will be 
  2549.               unpredictable.
  2550.  
  2551. Example       See program example 
  2552.  
  2553. Source        b101123d.asm
  2554.  
  2555. ----------------------------------------------------------------------
  2556. bvSet43hUsrFont        [EGA] [MCGA] [VGA]
  2557. ----------------------------------------------------------------------
  2558.  
  2559. Description   Sets the vector for Int 43h to point to the user's font 
  2560.               table and update the video ROM BIOS data area.
  2561.  
  2562. Summary       VOID bvSet43hUsrFont( rows, points, scnrows, fonttbl );
  2563.               INT2       rows            character rows specifier
  2564.               UINT2      points          bytes per character
  2565.               INT2       scnrows         rows per screen
  2566.               VOID       *fonttbl        pointer to the user font 
  2567.                                          table
  2568.  
  2569. Remarks       If this function is used at any other time than 
  2570.               immediately after a set mode, the results will be 
  2571.               unpredictable.
  2572.  
  2573. Example       See program example 
  2574.  
  2575. Source        b101121d.asm
  2576.  
  2577. ----------------------------------------------------------------------
  2578. bvSetAltPrtSc        [EGA] [VGA]
  2579. ----------------------------------------------------------------------
  2580.  
  2581. Description   Selects an alternate print-screen routine for the EGA 
  2582.               and VGA that works properly if the screen length is not 
  2583.               25 lines.
  2584.  
  2585. Summary       VOID bvSetAltPrtSc( VOID );
  2586.  
  2587. Example       See program example 
  2588.  
  2589. Source        b101220d.asm
  2590.  
  2591. ----------------------------------------------------------------------
  2592. bvSetBlink            [PCjr] [EGA] [MCGA] [VGA]
  2593. ----------------------------------------------------------------------
  2594.  
  2595. Description   Determines if the significant bit in an attribute will 
  2596.               display either blinking or intensified.
  2597.  
  2598. Summary       VOID bvSetBlink( state );
  2599.               INT2       state           0 - enables intensity
  2600.                                          1 - enables blinking
  2601.  
  2602. Example       See program example 
  2603.  
  2604. Source        b101003d.asm
  2605.  
  2606. ----------------------------------------------------------------------
  2607. bvSetBlkSpec        [EGA] [MCGA] [VGA]
  2608. ----------------------------------------------------------------------
  2609.  
  2610. Description   Determines character blocks selected by bit 3 of the 
  2611.               charac ter attribute bytes in alphanumeric display 
  2612.               modes.
  2613.  
  2614. Summary       VOID bvSetBlkSpec( block );
  2615.               INT2       block           select code for char 
  2616.                                          generator block
  2617.  
  2618. Remarks       EGA, MCGA
  2619.               Bits   Description
  2620.               0,1   indicates which 1 of 4 256 character tables is used when 
  2621.               bit 3 of character's attribute byte is zero.
  2622.  
  2623.                2,3   indicate which table is used when bit 3 is set on.
  2624.  
  2625.               VGA
  2626.               Bits   Description
  2627.               0,1,4   specify 1 of 8 tables when bit 3 is zero.
  2628.               2,3,5   specify table when attribute bit 3 is one.
  2629.  
  2630. Example       See program example 
  2631.  
  2632. Source        b101103d.asm
  2633.  
  2634. ----------------------------------------------------------------------
  2635. bvSetBorder        [PCjr] [EGA] [VGA]
  2636. ----------------------------------------------------------------------
  2637.  
  2638. Description   Controls the color of the screen border.
  2639.  
  2640. Summary       VOID bvSetBorder( color );
  2641.               INT2       color           color of border.  Range 
  2642.                                          (0-63).
  2643.  
  2644. Example       See program example 
  2645.  
  2646. Source        b101001d.asm
  2647.  
  2648. ----------------------------------------------------------------------
  2649. bvSetColorPgMode    [VGA]
  2650. ----------------------------------------------------------------------
  2651.  
  2652. Description   Sets paging mode for color registers
  2653.  
  2654. Summary       VOID bvSetColorPgMode( pgstate );
  2655.               INT2       pgstate         00 - sets 4 pages of 64 
  2656.                                          registers
  2657.                                          01 - sets 16 pages of 16 
  2658.                                          regis ters
  2659.  
  2660. Remarks       This function is invalid for graphics video mode 13H 
  2661.               (320x200, 256 colors).
  2662.  
  2663. Example       See program example 
  2664.  
  2665. Source        b101013d.asm
  2666.  
  2667. ----------------------------------------------------------------------
  2668. bvSetColorReg        [MCGA] [VGA]
  2669. ----------------------------------------------------------------------
  2670.  
  2671. Description   Set red-green-blue values for a color register
  2672.  
  2673. Summary       VOID bvSetColorReg( colorreg, green, blue, red );
  2674.               UINT2      colorreg        color register
  2675.               INT2       green           green color value
  2676.               INT2       blue            blue color value
  2677.               INT2       red             red color value
  2678.  
  2679. Remarks       When gray-scale summing is on, the gray-scale weighted 
  2680.               values are calculated as described under the function 
  2681.               bvSetGrayScale and stored into the components of the 
  2682.               color register.
  2683.  
  2684. Example       See program example 
  2685.  
  2686. Source        b101010d.asm
  2687.  
  2688. ----------------------------------------------------------------------
  2689. bvSetColorRegBlk    [MCGA] [VGA]
  2690. ----------------------------------------------------------------------
  2691.  
  2692. Description   Set a series of consecutive color registers.
  2693.  
  2694. Summary       VOID bvSetColorRegBlk( startreg, regcount, colortbl );
  2695.               UINT2      startreg        first color register
  2696.               INT2       regcount        number of registers
  2697.               BYTE       colortbl[][3]   color table that consists of 
  2698.                                          3 bytes for every register.  
  2699.                                          Each group of 3 bytes will 
  2700.                                          specify the red, green, and 
  2701.                                          blue values, respectively 
  2702.                                          for the associated register.
  2703.  
  2704. Remarks       When gray-scale summing is on, the gray-scale weighted 
  2705.               values are calculated as described under the function 
  2706.               bvSetGrayScale and stored into the components of the 
  2707.               color register.
  2708.  
  2709. Example       See program example 
  2710.  
  2711. Source        b101012d.asm
  2712.  
  2713. ----------------------------------------------------------------------
  2714. bvSetColorRegPg    [VGA]
  2715. ----------------------------------------------------------------------
  2716.  
  2717. Description   Set a color register page.
  2718.  
  2719. Summary       VOID bvSetColorRegPg( pg );
  2720.               INT2       pg              color register page to 
  2721.                                          select.
  2722.  
  2723. Remarks       This function is invalid for graphics video mode 13H 
  2724.               (320x200, 256 colors).
  2725.  
  2726. Example       See program example 
  2727.  
  2728. Source        b101013d.asm
  2729.  
  2730. ----------------------------------------------------------------------
  2731. bvSetCurPos        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2732. ----------------------------------------------------------------------
  2733.  
  2734. Description   Sets cursor position for the selected page.
  2735.  
  2736. Summary       VOID bvSetCurPos( pg, row, col );
  2737.               INT2       pg              page to set cursor position
  2738.               INT2       row             row (y coordinate)
  2739.               INT2       col             col (x coordinate)
  2740.  
  2741. Example       See program example 
  2742.  
  2743. Source        b100200d.asm
  2744.  
  2745. ----------------------------------------------------------------------
  2746. bvSetCurType        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2747. ----------------------------------------------------------------------
  2748.  
  2749. Description   Selects starting and ending scan lines for the cursor 
  2750.               in text  modes.
  2751.  
  2752. Summary       VOID bvSetCurType( StScan, SpScan );
  2753.               INT2       StScan          starting scan line for 
  2754.                                          cursor
  2755.               INT2       SpScan          ending scan line for cursor
  2756.  
  2757. Remarks       In text modes, the hardware causes the cursor to blink, 
  2758.               which  cannot be disabled.  In graphics mode, the 
  2759.               cursor is not available.
  2760.  
  2761.               The scan line ranges for the cursor are:
  2762.  
  2763.               Mode   Start   End
  2764.               7        0     12
  2765.               0-3      0      7
  2766.                    
  2767.               For example, the X's would be the position of the  
  2768.               cursor on a text row using scan lines 6 and 7 for a CGA 
  2769.               display.
  2770.  
  2771.               0 --
  2772.               1 --
  2773.               2 --
  2774.               3 --
  2775.               4 --
  2776.               5 --
  2777.               6 --  XX
  2778.               7 --  XX
  2779.  
  2780.               In text modes 0-3 the EGA, MCGA, and VGA provide cursor 
  2781.                emulation for the starting and ending scan lines.  The 
  2782.               staring  and ending values are remapped from an 8x8 
  2783.               cell to the true  character cell dimension.
  2784.  
  2785.               One technique used to hide the cursor is by passing in 
  2786.               the value 32H or 00100000B) for the starting and ending 
  2787.               scan lines.
  2788.  
  2789. Example       See program example 
  2790.  
  2791. Source        b100100d.asm
  2792.  
  2793. ----------------------------------------------------------------------
  2794. bvSetGrayScale        [MCGA] [VGA]
  2795. ----------------------------------------------------------------------
  2796.  
  2797. Description   Sets red, green and blue values of one or more color 
  2798.               regis ters  into the gray-scale equivalents.
  2799.  
  2800. Summary       VOID bvSetGrayScale( startreg, regcount );
  2801.               UINT2      startreg        first color register
  2802.               INT2       regcount        number of registers
  2803.  
  2804. Remarks       For the range of color registers specified, each 
  2805.               register is read and each new color value is calculated 
  2806.               as 30% red + 59% green + 11% blue.
  2807.  
  2808. Example       See program example 
  2809.  
  2810. Source        b10101bd.asm
  2811.  
  2812. ----------------------------------------------------------------------
  2813. bvSetMode            [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2814. ----------------------------------------------------------------------
  2815.  
  2816. Description   Set video display mode.
  2817.  
  2818. Summary       VOID bvSetMode( mode, clear );
  2819.               UINT       mode            video mode to set
  2820.               UINT       clear           0 -  clear display buffer 
  2821.                                          for new mode.
  2822.                                          1 -  do not clear display 
  2823.                                          buffer for new mode. This 
  2824.                                          parameter is ignored on PC's 
  2825.                                          and PC/XT's with a cga or 
  2826.                                          monochrome dis play adapter.
  2827.  
  2828. Remarks       The video modes applicable for the various video 
  2829.               adapters are as follows:
  2830.  
  2831.                               Text/
  2832.               Mode Resolution Colors Graphics  MDA CGA PCjr EGA MCGA VGA
  2833.                00h 40x25        16   text           x   x    x    x   x
  2834.                01h 40x25        16   text           x   x    x    x   x
  2835.                02h 80x25        16   text           x   x    x    x   x
  2836.                03h 80x25        16   text           x   x    x    x   x
  2837.                04h 320x200      4    graphics       x   x    x    x   x
  2838.                05h 320x200      4    graphics       x   x    x    x   x
  2839.                06h 640x200      2    graphics       x   x    x    x   x
  2840.                07h 80x25        2*   text       x            x        x
  2841.                08h 160x200      16   graphics           x
  2842.                09h 320x200      16   graphics           x
  2843.                0Ah 640x200      4    graphics           x
  2844.                0Bh reserved
  2845.                0Ch reserved
  2846.                0Dh 320x200      16   graphics                x        x
  2847.                0Eh 640x200      16   graphics                x        x
  2848.                0Fh 640x350      2*   graphics                x        x
  2849.                10h 640x350      4    graphics                x**
  2850.                10h 640x350      16   graphics                x***     x
  2851.                11h 640x480      2    graphics                     x   x
  2852.                12h 640x480      16   graphics                         x
  2853.                13h 320x200      256  graphics                     x   x
  2854.  
  2855.               *   Monochrome monitor only.
  2856.               **  EGA with 64 KB of RAM.
  2857.               *** EGA with 128 KB or more of RAM.
  2858.  
  2859.               On the PC/AT, PCjr, and PS/2, if the "clear" parameter 
  2860.               is set, the display buffer is not cleared when a new 
  2861.               mode is  selected.  This capability is only available 
  2862.               on PC or PC/XT when an EGA or VGA adapter is installed.
  2863.  
  2864. Example       See program example 
  2865.  
  2866. Source        b1000xxd.asm
  2867.  
  2868. ----------------------------------------------------------------------
  2869. bvSetPage            [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2870. ----------------------------------------------------------------------
  2871.  
  2872. Description   Select active display page
  2873.  
  2874. Summary       VOID bvSetPage( pg );
  2875.               INT2       pg              page to select.
  2876.  
  2877. Example       See program example 
  2878.  
  2879. Source        b100500d.asm
  2880.  
  2881. ----------------------------------------------------------------------
  2882. bvSetPalBorder        [PCjr] [EGA] [VGA]
  2883. ----------------------------------------------------------------------
  2884.  
  2885. Description   Sets palette registers and border color
  2886.  
  2887. Summary       VOID bvSetPalBorder( list );
  2888.               CHAR       list[17]        Bytes 0-15 are the color 
  2889.                                          values to be loaded into the 
  2890.                                          appropriate palette 
  2891.                                          registers.  Byte 16 is 
  2892.                                          stored in the border color 
  2893.                                          regis ter.
  2894.  
  2895. Example       See program example 
  2896.  
  2897. Source        b100500d.asm
  2898.  
  2899. ----------------------------------------------------------------------
  2900. bvSetPalReg        [PCjr] [EGA] [MCGA] [VGA]
  2901. ----------------------------------------------------------------------
  2902.  
  2903. Description   Sets appropriate palette register to a displayable 
  2904.               color.
  2905.  
  2906. Summary       VOID bvSetPalReg( color, reg );
  2907.               INT2       color           color value
  2908.               INT2       reg             palette register
  2909.  
  2910. Remarks       For MCGA the color must be 07h and the reg variable 
  2911.               must be 012h.
  2912.  
  2913. Example       See program example 
  2914.  
  2915. Source        b101000d.asm
  2916.  
  2917. ----------------------------------------------------------------------
  2918. bvSetScanLines        [VGA]
  2919. ----------------------------------------------------------------------
  2920.  
  2921. Description   Selects the number of scan lines for text modes. The 
  2922.               selected  value takes effect the next time the 
  2923.               bvSetMode function is called to select the display 
  2924.               mode.
  2925.  
  2926. Summary       INT2 bvSetScanLines( scancode );
  2927.               INT2       scancode        0 - 200 scan lines
  2928.                                          1 - 350 scan lines
  2929.                                          2 - 400 scan lines
  2930.  
  2931. Returns       18 - VGA is active
  2932.               00 - VGA is not active
  2933.  
  2934. Example       See program example 
  2935.  
  2936. Source        b101230d.asm
  2937.  
  2938. ----------------------------------------------------------------------
  2939. bvSetState0B        [CGA] [PCjr] [EGA] [MCGA] [VGA]
  2940. ----------------------------------------------------------------------
  2941.  
  2942. Description   In text mode the border color is set. Graphics mode 
  2943.               sets the  border and background color.
  2944.  
  2945. Summary       VOID bvSetState0B( color );
  2946.               INT2       color           color to set background, 
  2947.                                          border
  2948.  
  2949. Example       See program example 
  2950.  
  2951. Source        b100b00d.asm
  2952.  
  2953. ----------------------------------------------------------------------
  2954. bvSwDsp            [VGA]
  2955. ----------------------------------------------------------------------
  2956.  
  2957. Description   Allows selection of one of two video adapters in the 
  2958.               system, when memory usage or port addresses conflict 
  2959.               between the two adapters.
  2960.  
  2961. Summary       UINT bvSwDsp( setting, buffer );
  2962.               INT2       setting         0 - disable initial video 
  2963.                                          adapter
  2964.                                          1 - enable system board 
  2965.                                          video adapter
  2966.                                          2 - disable active video 
  2967.                                          adapter
  2968.                                          3 - enable inactive video 
  2969.                                          adapter
  2970.               CHAR       *buffer         128-byte buffer to use if 
  2971.                                          setting is 1, 2, or 3.
  2972.  
  2973. Returns       18 - Function is supported.
  2974.  
  2975.  
  2976. Remarks       If the function is called with setting set to 0 or 2 
  2977.               then the video adapter state information is stored in 
  2978.               the buffer vari able.  If the function is called with 
  2979.               setting set to 3 then the information in the buffer 
  2980.               variable will be used to restore the video adapter
  2981.               state.
  2982.  
  2983. Example       See program example 
  2984.  
  2985. Source        b101235d.asm
  2986.  
  2987. ----------------------------------------------------------------------
  2988. bvVioAccess        [MCGA] [VGA]
  2989. ----------------------------------------------------------------------
  2990.  
  2991. Description   Enables or disables CPU access to the video adapter's 
  2992.               I/O ports and video refresh buffer.
  2993.  
  2994. Summary       INT2 bvVioAccess( setting );
  2995.               INT2       setting         0 - enables access
  2996.                                          1 - disable access
  2997.  
  2998. Returns       18 - Function is supported.
  2999.  
  3000. Example       See program example 
  3001.  
  3002. Source        b101232d.asm
  3003.  
  3004. ----------------------------------------------------------------------
  3005. bvWrtNCell        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  3006. ----------------------------------------------------------------------
  3007.  
  3008. Description   Write a character and attribute to the display at the 
  3009.               current cursor position for n times.
  3010.  
  3011. Summary       VOID bvWrtNCell( ch, attr, count, pg );
  3012.               INT2       ch              character
  3013.               INT2       attr            attribute
  3014.               INT2       count           number of cells to 
  3015.                                          replication
  3016.               INT2       pg              page to write cell to
  3017.  
  3018. Remarks       The cursor position is not updated are the character 
  3019.               attribute  values are displayed.
  3020.  
  3021.               In graphics mode the replication factor given in count 
  3022.               will display character attribute combinations only for 
  3023.               the current row.
  3024.  
  3025.               All characters will display something, including the 
  3026.               bell, backspace, carriage return and the line feed.  
  3027.               These control characters are NOT recognized as special 
  3028.               characters and will  not affect the cursor position.
  3029.  
  3030.               The character definition tables is stored in the vector 
  3031.               for the  bvSet43hxxxxFont functions for the EGA, MCGA 
  3032.               and VGA displays in graphics modes.
  3033.  
  3034. Example       See program example 
  3035.  
  3036. Source        b100900d.asm
  3037.  
  3038. ----------------------------------------------------------------------
  3039. bvWrtNChar        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  3040. ----------------------------------------------------------------------
  3041.  
  3042. Description   Write a character to the display at the current cursor 
  3043.               position for n times.
  3044.  
  3045. Summary       VOID bvWrtNChar( ch, count, pg );
  3046.               INT2       ch              character
  3047.               INT2       count           number of cells to 
  3048.                                          replication
  3049.               INT2       pg              page to write cell to
  3050.  
  3051. Example       See program example 
  3052.  
  3053. Source        b100a00d.asm
  3054.  
  3055. ----------------------------------------------------------------------
  3056. bvWrtPix            [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  3057. ----------------------------------------------------------------------
  3058.  
  3059. Description   Display pixel at the specified graphics coordinates
  3060.  
  3061. Summary       VOID bvWrtPix( row, col, pixval, pg );
  3062.               INT2       row             row for pixel to be 
  3063.                                          displayed on
  3064.               INT2       col             col for pixel to be 
  3065.                                          displayed on
  3066.               INT2       pixval          color of pixel
  3067.               INT2       pg              page to display pixel on
  3068.  
  3069. Example       See program example 
  3070.  
  3071. Source        b100c00d.asm
  3072.  
  3073. ----------------------------------------------------------------------
  3074. bvWrtTTYChar        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  3075. ----------------------------------------------------------------------
  3076.  
  3077. Description   Write character at the current cursor position using 
  3078.               the color specified (if in graphics mode).
  3079.  
  3080. Summary       VOID bvWrtTTYChar( ch, pg, color );
  3081.               INT2       ch              character to display
  3082.               INT2       pg              page to display the 
  3083.                                          character on
  3084.               INT2       color           color of character if in 
  3085.                                          graphics mode
  3086.  
  3087. Example       See program example .
  3088.  
  3089. Source        b100e00d.asm
  3090.  
  3091. ----------------------------------------------------------------------
  3092. bvWrtTTYStr        [MDA] [CGA] [PCjr] [EGA] [MCGA] [VGA]
  3093. ----------------------------------------------------------------------
  3094.  
  3095. Description   Displays a string to the video buffer starting at the 
  3096.               specified location.
  3097.  
  3098. Summary       VOID bvWrtTTYStr( mode, row, col, len, pg, attr, st );
  3099.               INT2       mode            0 - use attr, st is chars 
  3100.                                          only, cursor not updated
  3101.                                          1 - use attr, st is chars 
  3102.                                          only, cursor updated
  3103.                                          2 - st is char, attr; cursor 
  3104.                                          not updated
  3105.                                          3 - st is char, attr; cursor
  3106.               updatede  attr,           st is chars only, cursor 
  3107.                                          updated
  3108.               INT2       row             y coordinate
  3109.               INT2       col             x coordinate
  3110.               INT2       len             length of st
  3111.               INT2       pg              display page to display 
  3112.                                          string on.
  3113.               INT2       attr            attribute is mode is 0 or 1
  3114.               CHAR       *st             string to display on the 
  3115.                                          screen
  3116.  
  3117. Example       See program example 
  3118.  
  3119. Source        b1013xxd.asm
  3120.  
  3121.  
  3122.  
  3123.                                Chapter 5
  3124.                                  Mouse
  3125.  
  3126.                   +--------------------------------+
  3127.                   |                                |
  3128.                   |  The functions in this section |
  3129.                   |    support the mouse device.   |
  3130.                   |                                |
  3131.                   | Thank-you for supporting the   |
  3132.                   |        FlashPac Library        |
  3133.                   |                                |
  3134.                   +--------------------------------+
  3135.  
  3136. Global Variables
  3137.  
  3138. UINT   NEvents   contains the number of events waiting in the mouse event handler 
  3139. queue.
  3140. ----------------------------------------------------------------------
  3141. mButtonPress            [2.00+]
  3142. ----------------------------------------------------------------------
  3143.  
  3144. Description   Returns the current button status information.
  3145.  
  3146. Summary       INT2 MButtonPress( Button, ButPress, x, y );
  3147.               INT2       Button          specifies button to check.
  3148.                                          0 - left button
  3149.                                          1 - right button
  3150.                                          2 - middle button
  3151.               INT2       *ButPress       number of button presses 
  3152.                                          since the last call to 
  3153.                                          MButtonPress.
  3154.               INT2       *x              column the mouse cursor was 
  3155.                                          in the last time the button 
  3156.                                          was pressed.
  3157.               INT2       *y              row the mouse cursor was in 
  3158.                                          the last time the button was 
  3159.                                          pressed.
  3160.  
  3161. Remarks       MButtonPress will return an integer indicating the 
  3162.               current state of  the mouse button requested.  0 is 
  3163.               returned when the button is released and 1 when button 
  3164.               pressed.
  3165.  
  3166. Example       See program example 
  3167.  
  3168. Source        mbutinfo.asm
  3169.  
  3170. ----------------------------------------------------------------------
  3171. mButtonRel              [2.00+]
  3172. ----------------------------------------------------------------------
  3173.  
  3174. Description   Returns the current button status information.
  3175.  
  3176. Summary       INT2 MButtonRel( Button, ButPress, x, y );
  3177.               INT2       Button          specifies the button to 
  3178.                                          check.
  3179.                                          0 - left button
  3180.                                          1 - right button
  3181.                                          2 - middle button
  3182.               INT2       *ButPress       number of button releases 
  3183.                                          since the last call to 
  3184.                                          MButtonRel.
  3185.               INT2       *x              column the mouse cursor was 
  3186.                                          in the last time the button 
  3187.                                          was released.
  3188.               INT2       *y              row the mouse cursor was in 
  3189.                                          the last time the button was 
  3190.                                          released.
  3191.  
  3192. Remarks       MButtonReleased will return an integer indicating the 
  3193.               current state of the mouse button requested.  0 is 
  3194.               returned when the button is released and 1 when button 
  3195.               pressed.
  3196.  
  3197. Example       See program example 
  3198.  
  3199. Source        mbutinfo.asm
  3200.  
  3201. ----------------------------------------------------------------------
  3202. mGetPos                 [2.00+]
  3203. ----------------------------------------------------------------------
  3204.  
  3205. Description   Returns the current button status and the location of 
  3206.               the mouse  cursor.
  3207.  
  3208. Summary       VOID MGetPos( Button, x, y );
  3209.               INT2       *Button         returns the status of each 
  3210.                                          button by its corresponding
  3211.                                          bit value. If a bit is 0 then
  3212.                                          that button is up.  If a bit
  3213.                                          is 1 then that button is
  3214.                                          pressed.
  3215.  
  3216.                                          Bit Value   Button
  3217.                                          0     1     left
  3218.                                          1     2     right
  3219.                                          2     4     middle
  3220.  
  3221.               INT2       *x              column the mouse cursor is 
  3222.                                          in.
  3223.               INT2       *y              row the mouse cursor is in.
  3224.  
  3225. Remarks       In 80 column text mode the upper left corner of the 
  3226.               screen is 1,1 and the lower right corner is 80,25.
  3227.  
  3228. Example       See program example 
  3229.  
  3230. Source        mgetpos.asm
  3231.  
  3232. ----------------------------------------------------------------------
  3233. mGetSpeed               [2.00+]
  3234. ----------------------------------------------------------------------
  3235.  
  3236. Description   Returns the distance the mouse has moved since the last 
  3237.               call to this routine.
  3238.  
  3239. Summary       VOID MGetSpeed( HorCnt, VerCnt );
  3240.               INT2       *HorCnt         returns horizontal step 
  3241.                                          count since last call.
  3242.               INT2       *VerCnt         returns vertical step count 
  3243.                                          since last call.
  3244.  
  3245. Remarks       The step count is always in the range -32768 to 32767. 
  3246.               A positive value specifies movements to the right and 
  3247.               down while negative values specify movements to the 
  3248.               left and up.  After the call is completed the step 
  3249.               counts are reset to zero.
  3250.  
  3251. Example       See program example 
  3252.  
  3253. Source        mgspeed.asm
  3254.  
  3255. ----------------------------------------------------------------------
  3256. mGraphCursor            [2.00+]
  3257. ----------------------------------------------------------------------
  3258.  
  3259. Description   Defines the shape and color of the mouse cursor when in 
  3260.               graphics mode.
  3261.  
  3262. Summary       VOID MGraphCursor( XHotSpot, YHotSpot, CMaskSeg, 
  3263.               CMaskOfs );
  3264.               INT2       XHotSpot        a value in the range -16 to 
  3265.                                          16 used to define the X 
  3266.                                          pixel within or outside the 
  3267.                                          cursor block
  3268.               INT2       YHotSpot        a value in the range -16 to 
  3269.                                          16 used to define the Y 
  3270.                                          pixel within or outside the 
  3271.                                          cursor block.
  3272.               UINT2      CMaskSeg        the segment of the cursor 
  3273.                                          mask description variable.
  3274.               UINT2      CMaskOfs        the offset of the cursor 
  3275.                                          mask description variable.
  3276.  
  3277. Remarks       The cursor mask variable is two arrays of 16 words 
  3278.               each.  The first 16 words define the screen mask and 
  3279.               the second 16 words define the cursor mask.  Each array 
  3280.               of 16 words defines the set of pixels that are 16x16.
  3281.  
  3282.               The screen mask is used to determine which pixels 
  3283.               become part of the cursor shape while the cursor mask 
  3284.               is used to determine the color/shape of the cursor.
  3285.  
  3286. Example       See program example 
  3287.  
  3288. Source        mgraphcu.asm
  3289.  
  3290. ----------------------------------------------------------------------
  3291. mHideCursor             [2.00+]
  3292. ----------------------------------------------------------------------
  3293.  
  3294. Description   Removes the mouse cursor from the screen.
  3295.  
  3296. Summary       VOID MHideCursor( VOID );
  3297.  
  3298. Remarks       Although the mouse cursor is hidden from view its 
  3299.               motion is still  tracked.
  3300.  
  3301. Example       See program example 
  3302.  
  3303. Source        mhidecur.asm
  3304.  
  3305. ----------------------------------------------------------------------
  3306. mInitEventHandler       [2.00+]
  3307. ----------------------------------------------------------------------
  3308.  
  3309. Description   Initializes the mouse interrupt event handler.
  3310.  
  3311. Summary       VOID MInitEventHandler( EventMask );
  3312.               INT2       EventMask       defines the event types the
  3313.               mouse      event           handler will place in its 
  3314.                                          queue.
  3315.  
  3316. Remarks       Each bit in the event mask corresponds to a specific 
  3317.               event:
  3318.  
  3319.               Bit  Value   Event
  3320.               0      1     cursor position moved
  3321.               1      2     left button pressed
  3322.               2      4     left button released
  3323.               3      8     right button pressed
  3324.               4      16    right button released
  3325.               5      32    middle button pressed
  3326.               6      64    middle button released
  3327.               7-15         not used
  3328.  
  3329. Example       See program example 
  3330.  
  3331. Source        minithan.asm
  3332.  
  3333. ----------------------------------------------------------------------
  3334. mPollQue                        [2.00+]
  3335. ----------------------------------------------------------------------
  3336.  
  3337. Description   Returns a copy of the oldest event in the mouse event 
  3338.               queue. The event queue is left unchanged.
  3339.  
  3340. Summary       VOID MPollQue( Event, ButStat, x, y );
  3341.               INT2       *Event          an integer describing the 
  3342.                                          event that occurred (See 
  3343.                                          MInitEventHandler).
  3344.               INT2       *ButStat        button status at time of 
  3345.                                          event.
  3346.               INT2       *x              column mouse cursor was 
  3347.                                          located in at the time of 
  3348.                                          event.
  3349.               INT2       *y              row mouse cursor was located 
  3350.                                          in at the time of event.
  3351.  
  3352. Remarks       If the number of events in the queue is zero when this 
  3353.               pro cedure is called the values in the return variables 
  3354.               will be -1.  Use the global variable NEvents to 
  3355.               determine if an event is in the queue.
  3356.  
  3357. Example       See program example 
  3358.  
  3359. Source        mpollque.asm
  3360.  
  3361. ----------------------------------------------------------------------
  3362. mResetMouse             [2.00+]
  3363. ----------------------------------------------------------------------
  3364.  
  3365. Description   Determines if the mouse hardware and software are 
  3366.               installed.
  3367.  
  3368. Summary       INT2 MResetMouse( NBut );
  3369.               INT2       NBut            returns the number of 
  3370.                                          buttons on the mouse.
  3371.  
  3372. Remarks       MResetMouse will return:
  3373.               0  - Mouse hardware and software are not installed.
  3374.               -1 - Mouse hardware and software are installed.
  3375.  
  3376.               Every call to MResetMouse will also reset the position 
  3377.               of the mouse cursor to the middle of the video display.
  3378.  
  3379. Example       See program example 
  3380.  
  3381. Source        mresetm.asm
  3382.  
  3383. ----------------------------------------------------------------------
  3384. mRetQue                 [2.00+]
  3385. ----------------------------------------------------------------------
  3386.  
  3387. Description   Returns the oldest event in the mouse event queue and 
  3388.               removes the event from the queue.
  3389.  
  3390. Summary       VOID MRetQue( Event, ButStat , x, y );
  3391.               INT2       *Event          returns the event that 
  3392.                                          occurred (see 
  3393.                                          MInitEventHandler).
  3394.               INT2       *ButStat        button status at the time of 
  3395.                                          this event.
  3396.               INT2       *x              column mouse cursor was 
  3397.                                          located in at time of event.
  3398.               INT2       *y              row mouse cursor was located 
  3399.                                          in at time of event.
  3400.  
  3401. Remarks       If the number of events in the queue is zero when this 
  3402.               pro cedure is called the values in the return variables 
  3403.               will be -1.  Use the global variable NEvents to 
  3404.               determine if an event is in the queue.
  3405.  
  3406. Example       See program example 
  3407.  
  3408. Source        mretque.asm
  3409.  
  3410. ----------------------------------------------------------------------
  3411. mSetEvent                       [2.00+]
  3412. ----------------------------------------------------------------------
  3413.  
  3414. Description   Simulates a mouse event.
  3415.  
  3416. Summary       VOID MRetQue( Event, ButStat, x, y );
  3417.               INT        *Event          event that should occur (see 
  3418.                                          MInitEventHandler).
  3419.               INT        *ButStat        button status for this 
  3420.                                          event.
  3421.               INT        *x              column of the mouse cursor 
  3422.                                          for this event.
  3423.               INT        *y              row of the mouse cursor for 
  3424.                                          this event.
  3425.  
  3426. Remarks       If the number of events in the queue is less than the 
  3427.               maxi mum number of events allowed in the queue then the 
  3428.               event will be placed as the newest or last mouse event 
  3429.               to occur.  All global and local variables used for this 
  3430.               procedure will be upd
  3431.  
  3432.               ated exactly the same as if an actual mouse event had 
  3433.               occurred.
  3434.  
  3435. Example       See program example 
  3436.  
  3437. Source        msetevnt.asm
  3438.  
  3439. ----------------------------------------------------------------------
  3440. mSetPos                 [2.00+]
  3441. ----------------------------------------------------------------------
  3442.  
  3443. Description   Set the position of the mouse cursor.
  3444.  
  3445. Summary       VOID MSetPos( x, y );
  3446.               INT2       x               column to put mouse cursor 
  3447.                                          in
  3448.               INT2       y               row to put mouse cursor in
  3449.  
  3450. Remarks       Checks for valid X and Y values are NOT performed.  In 
  3451.               80 column text mode the upper left corner of the screen 
  3452.               is 1,1 and the lower right corner is 80,25.
  3453.  
  3454. Example       See program example 
  3455.  
  3456. Source        msetpos.asm
  3457.  
  3458. ----------------------------------------------------------------------
  3459. mSetSpeed                       [2.00+]
  3460. ----------------------------------------------------------------------
  3461.  
  3462. Description   Sets mouse motion to screen pixel ratio.
  3463.  
  3464. Summary       VOID MSetSpeed( HorCnt, VerCnt );
  3465.               INT2       HorCnt          the horizontal step ratio.  
  3466.                                          The value is in the range of 
  3467.                                          1 to 32767 where the ratio 
  3468.                                          will be HorCnt steps to 8 
  3469.                                          pixels hori zontally.
  3470.               INT2       VerCnt          the vertical step ratio.  
  3471.                                          The value is in the range of 
  3472.                                          1 to 32767 where the ratio 
  3473.                                          will be VerCnt steps to 8 
  3474.                                          pixels verti cally.
  3475.  
  3476. Remarks       The step values refer to the amount of mouse movement.
  3477.  
  3478. Example       See program example 
  3479.  
  3480. Source        msspeed.asm
  3481.  
  3482. ----------------------------------------------------------------------
  3483. mSetXRange              [2.00+]
  3484. ----------------------------------------------------------------------
  3485.  
  3486. Description   Sets the column boundaries the mouse cursor will be 
  3487.               allowed to move within.
  3488.  
  3489. Summary       VOID MSetXRange( Min, Max );
  3490.               INT2       Min             left col boundary for mouse 
  3491.                                          cursor.
  3492.               INT2       Max             right col boundary for mouse 
  3493.                                          cursor.
  3494.  
  3495. Remarks       Range checks are not performed on the parameters.
  3496.  
  3497. Example       See program example 
  3498.  
  3499. Source        msetxy.asm
  3500.  
  3501. ----------------------------------------------------------------------
  3502. mSetYRange              [2.00+]
  3503. ----------------------------------------------------------------------
  3504.  
  3505. Description   Sets the row boundaries the mouse cursor will be 
  3506.               allowed to move within.
  3507.  
  3508. Summary       VOID MSetYRange( Min, Max );
  3509.               INT2       Min             top row boundary for mouse 
  3510.                                          cursor.
  3511.               INT2       Max             bottom row boundary for 
  3512.                                          mouse cursor.
  3513.  
  3514. Remarks       Range checks are not performed on the parameters.
  3515.  
  3516. Example       See program example 
  3517.  
  3518. Source        msetxy.asm
  3519.  
  3520. ----------------------------------------------------------------------
  3521. mShowCursor             [2.00+]
  3522. ----------------------------------------------------------------------
  3523.  
  3524. Description   Display the mouse cursor on the screen
  3525.  
  3526. Summary       VOID MShowCursor( VOID );
  3527.  
  3528. Example       See program example 
  3529.  
  3530. Source        mshowcur.asm
  3531.  
  3532. ----------------------------------------------------------------------
  3533. mTextCursor             [2.00+]
  3534. ----------------------------------------------------------------------
  3535.  
  3536. Description   Defines the mouse text cursor
  3537.  
  3538. Summary       VOID MTextCursor( CType, SMask, CMask );
  3539.               INT2       CType           selects the type of mouse 
  3540.                                          cur sor to use.
  3541.                                          0 - software cursor
  3542.                                          1 - hardware cursor
  3543.               INT2       SMask           if the software cursor is 
  3544.                                          selected the screen mask is 
  3545.                                          defined.  If the hardware 
  3546.                                          cursor is selected the 
  3547.                                          starting scan line is 
  3548.                                          defined.
  3549.               INT2       CMask           if the software cursor is 
  3550.                                          selected the cursor mask is 
  3551.                                          defined.  If the hardware 
  3552.                                          cursor is selected the 
  3553.                                          ending scan line is defined.
  3554.  
  3555. Remarks       The screen mask is an integer that defines which of the 
  3556.               character attributes are preserved.  The cursor mask is 
  3557.               used to determine which of the characteristics are 
  3558.               changed by the cursor.  See SetCursor Size in chapter 
  3559.               two for a description of 
  3560.  
  3561.               the starting and ending scan lines.
  3562.  
  3563. Example       See program example 
  3564.  
  3565. Source        mtextcur.asm
  3566.  
  3567.  
  3568.  
  3569.                                Chapter 6
  3570.                                Keyboard
  3571.  
  3572.                   +--------------------------------+
  3573.                   |                                |
  3574.                   |  The functions in this section |
  3575.                   |      support the keyboard.     |
  3576.                   |                                |
  3577.                   | Thank-you for supporting the   |
  3578.                   |        FlashPac Library        |
  3579.                   |                                |
  3580.                   +--------------------------------+
  3581.  
  3582. ----------------------------------------------------------------------
  3583. BiosKbdClr        [PC][AT][PS/2]
  3584. ----------------------------------------------------------------------
  3585.  
  3586. Description   Clear the keyboard buffer.
  3587.  
  3588. Summary       VOID BiosKbdClr( VOID );
  3589.  
  3590. Remarks       BiosKbdClr uses the BIOS to clear any characters in the 
  3591.               keyboard buffer waiting to be read.
  3592.  
  3593. See Also      DosKbdClr
  3594.  
  3595. Example       See program example 
  3596.  
  3597. Source        bkbdclr.asm
  3598.  
  3599. ----------------------------------------------------------------------
  3600. BiosKbdGetElmt        [PC][AT][PS/2]
  3601. ----------------------------------------------------------------------
  3602.  
  3603. Description   Returns an integer value for the key pressed on the key 
  3604.               board.
  3605.  
  3606. Summary       INT2 BiosKbdGetElmt( VOID );
  3607.  
  3608. Remarks       BiosKbdGetElmt will return an integer in the range of 
  3609.               0-388.  Use Appendix C as a guide to find the keyboard 
  3610.               element code this function returns for a particular key 
  3611.               pressed on the keyboard.  When using DOS function calls 
  3612.               there is not any meth
  3613.  
  3614.               od available to distinguish the difference between some 
  3615.               keystrokes and key combinations.  An example of this is 
  3616.               the Enter key and the Ctrl-M keys, both return a value 
  3617.               of 145. Key combinations using the control key with an 
  3618.               alpha char acter and all oth
  3619.  
  3620.               er ASCII characters will be offset by 132.
  3621.  
  3622. See Also      BiosKbdRead, DosKbdGetElmt, DosKbdRead
  3623.  
  3624. Example       See program example 2
  3625.  
  3626. Source        bkbdelmt.asm
  3627.  
  3628. ----------------------------------------------------------------------
  3629. BiosKbdHit        [PC][AT][PS/2]
  3630. ----------------------------------------------------------------------
  3631.  
  3632. Description   Reports if a keystroke is waiting to be read from the 
  3633.               key board  buffer.
  3634.  
  3635. Summary       INT2 BiosKbdHit( VOID );
  3636.  
  3637. Remarks       Using the BIOS services BiosKbdHit checks the keyboard 
  3638.               status to determine if a key is waiting to be read from 
  3639.               the keyboard buffer.
  3640.  
  3641. See Also      DosKbdHit
  3642.  
  3643. Example       See program example 
  3644.  
  3645. Source        bkbdhit.asm
  3646.  
  3647. ----------------------------------------------------------------------
  3648. BiosKbdRead        [PC][AT][PS/2]
  3649. ----------------------------------------------------------------------
  3650.  
  3651. Description   Read a character from the keyboard.
  3652.  
  3653. Summary       VOID BiosKbdRead( Ch );
  3654.               CHAR       *Ch             returns a string of length 
  3655.                                          zero, one, or two bytes long 
  3656.                                          defining the key or key 
  3657.                                          combination pressed from the 
  3658.                                          keyboard.
  3659.  
  3660. Remarks       BiosKbdRead reads a single character from the keyboard 
  3661.               buffer.  BiosKbdRead will return a zero, one, or two 
  3662.               charac ter string.  A null string indicates that Ctrl- 
  3663.               Break was pressed.  A one character string indicates a 
  3664.               normal ASCII character w
  3665.  
  3666.               as read from the keyboard.  A two-character string 
  3667.               indicates a special extended keyboard code.  Refer to 
  3668.               appendix B for a list of the extended keyboard codes.  
  3669.               The data type definition for BiosKbdRead is an untyped 
  3670.               variable using a minimum of three b
  3671.  
  3672.               ytes.
  3673.  
  3674. See Also      BiosKbdGetElmt, DosKbdGetElmt, DosKbdRead
  3675.  
  3676. Example       See program example 
  3677.  
  3678. Source        bkbdread.asm
  3679.  
  3680. ----------------------------------------------------------------------
  3681. BiosKbdStat        [PC][AT][PS/2]
  3682. ----------------------------------------------------------------------
  3683.  
  3684. Description   Get the keyboard status byte
  3685.  
  3686. Summary       INT2 BiosKbdStat( VOID );
  3687.  
  3688. Returns       BiosKbdStat returns the keyboard status byte as 
  3689.               follows:
  3690.  
  3691.  
  3692.                              Bits
  3693.               | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
  3694.  
  3695.               Bit   Key Pressed
  3696.               0     Right Shift
  3697.               1     Left Shift
  3698.               2     Control
  3699.               3     Alternate
  3700.               4     Scroll Lock
  3701.               5     Num Lock
  3702.               6     Caps Lock
  3703.               7     Insert
  3704.  
  3705.               A one in the bit position means the condition is true
  3706.               and a zero in the bit position means the condition is
  3707.               false.
  3708.  
  3709. Example       See program example 
  3710.  
  3711. Source        bkbdstat.asm
  3712.  
  3713. ----------------------------------------------------------------------
  3714. bkeGetKbdFlags        [AT][PS/2]
  3715. ----------------------------------------------------------------------
  3716.  
  3717. Description   Return the status of the enhanced keyboard shift and 
  3718.               toggle keys.
  3719.  
  3720. Summary       UINT2 bkeGetKbdFlags( VOID );
  3721.  
  3722. Returns       bkeGetKbdFlags returns a word to describe the state of 
  3723.               the various shift and toggle keys on the enhanced 
  3724.               keyboard.
  3725.  
  3726.  
  3727.                     Bits
  3728.               |F|E|D|C|B|A|9|8|7|6|5|4|3|2|1|0|
  3729.  
  3730.               Bit   Status of key
  3731.                0    right shift key down
  3732.                1    left shift key down
  3733.                2    left or right control key down
  3734.                3    left or right alternate key down
  3735.                4    scroll lock on
  3736.                5    num lock on
  3737.                6    caps lock on
  3738.                7    insert on
  3739.                8    left ctrl key down
  3740.                9    left alt key down
  3741.                A    right control key down
  3742.                B    right alt key down
  3743.                C    scroll key down
  3744.                D    num lock key down
  3745.                E    caps lock key down
  3746.                F    sysreq key down
  3747.  
  3748.                A one in the bit position means the condition is true
  3749.                and a zero in the bit position means the condition is
  3750.                false.
  3751.  
  3752. Example       See program example 
  3753.  
  3754. Source        b161200d.asm
  3755.  
  3756. ----------------------------------------------------------------------
  3757. bkeGetKbdStatus    [AT][PS/2]
  3758. ----------------------------------------------------------------------
  3759.  
  3760. Description   This function returns a character and scan code from 
  3761.               the keyboard buffer if one is waiting or returns a -1 
  3762.               if the key board buffer is empty.
  3763.  
  3764. Summary       UINT2 bkeGetKbdStatus( VOID );
  3765.  
  3766. Returns       -1 if no character is waiting in the keyboard buffer.
  3767.  
  3768.               hi byte - scan code if a character is waiting to be read
  3769.               lo byte - ASCII character if a character is waiting to
  3770.                         be read
  3771.  
  3772. Remarks       The ASCII character and scan code returned by this 
  3773.               function is not removed from the keyboard buffer.  A 
  3774.               call to bkeReadCh will be required to remove the ASCII 
  3775.               character and scan code from the keyboard buffer.
  3776.  
  3777.               This function is for use with the enhance keyboard to 
  3778.               allow testing for the additional F11, F12, and cursor 
  3779.               control keys.
  3780.  
  3781. Example       See program example 
  3782.  
  3783. Source        b161100d.asm
  3784.  
  3785. ----------------------------------------------------------------------
  3786. bkeReadCh        [AT][PS/2]
  3787. ----------------------------------------------------------------------
  3788.  
  3789. Description   Read character and scan code from keyboard buffer.
  3790.  
  3791. Summary       UINT2 bkeGetKbdFlags( VOID );
  3792.  
  3793. Returns       hi byte - scan code
  3794.               lo byte - ascii character
  3795.  
  3796. Remarks       This function is for use with the enhanced keyboard so 
  3797.               the scan codes can be obtained for the additional F11, 
  3798.               F12, and cursor control keys.
  3799.  
  3800. Example       See program example 
  3801.  
  3802. Source        b161000d.asm
  3803.  
  3804. ----------------------------------------------------------------------
  3805. bkGetKbdFlags        [PC][AT][PS/2]
  3806. ----------------------------------------------------------------------
  3807.  
  3808. Description   Returns the flags byte that describes the state of the 
  3809.               key board toggle and shift keys.
  3810.  
  3811. Summary       UINT2 bkGetKbdFlags( VOID );
  3812.  
  3813. Returns       bkGetKbdFlags returns a byte to describe the state of 
  3814.               the various shift and toggle keys on the keyboard.
  3815.  
  3816.  
  3817.                    Bits
  3818.               |7|6|5|4|3|2|1|0|
  3819.  
  3820.               Bit   Status of key
  3821.                0    right shift key down
  3822.                1    left shift key down
  3823.                2    left or right control key down
  3824.                3    left or right alternate key down
  3825.                4    scroll lock on
  3826.                5    num lock on
  3827.                6    caps lock on
  3828.                7    insert on
  3829.  
  3830.               A one in the bit position means the condition is true
  3831.               and a zero in the bit position means the condition is
  3832.               false.
  3833.  
  3834. Example       See program example 
  3835.  
  3836. Source        b160200d.asm
  3837.  
  3838. ----------------------------------------------------------------------
  3839. bkGetKbdStatus        [PC][AT][PS/2]
  3840. ----------------------------------------------------------------------
  3841.  
  3842. Description   This function returns a character and scan code from 
  3843.               the keyboard buffer if one is waiting or returns a -1 
  3844.               if the key board buffer is empty.
  3845.  
  3846. Summary       UINT2 bkGetKbdStatus( VOID );
  3847.  
  3848. Returns       -1 if no character is waiting in the keyboard buffer.
  3849.  
  3850.               hi byte - scan code if a character is waiting to be read
  3851.               lo byte - ascii character if a character is waiting to
  3852.                         be read
  3853.  
  3854. Remarks       The ascii character and scan code returned by this 
  3855.               function is not removed from the keyboard buffer.  A 
  3856.               call to bkeReadCh will be required to remove the ascii 
  3857.               character and scan code from the keyboard buffer.
  3858.  
  3859. Example       See program example 
  3860.  
  3861. Source        b160100d.asm
  3862.  
  3863. ----------------------------------------------------------------------
  3864. bkPushKeyCodes    [AT][PS/2]
  3865. ----------------------------------------------------------------------
  3866.  
  3867. Description   Put a keyboard scan code and ascii character in the key 
  3868.               board buffer.
  3869.  
  3870. Summary       UINT2 bkPushKeyCodes( scancode, ascii );
  3871.               INT2       scancode        keyboard scan code to place 
  3872.                                          in keyboard buffer.
  3873.               INT2       ascii           ascii character value to 
  3874.                                          place in keyboard buffer.
  3875.  
  3876. Returns       0 - operation successful
  3877.  
  3878. 1 - operation unsuccessful
  3879. Example       See program example 
  3880.  
  3881. Source        b160500d.asm
  3882.  
  3883. ----------------------------------------------------------------------
  3884. bkReadCh            [PC][AT][PS/2]
  3885. ----------------------------------------------------------------------
  3886.  
  3887. Description   Read character and scan code from keyboard buffer.
  3888.  
  3889. Summary       UINT2 bkGetKbdFlags( VOID );
  3890.  
  3891. Returns       hi byte - scan code
  3892.               lo byte - ascii character
  3893.  
  3894. Example       See program example 
  3895.  
  3896. Source        b160000d.asm
  3897.  
  3898. ----------------------------------------------------------------------
  3899. bkSetRepeatRate        [AT][PS/2]
  3900. ----------------------------------------------------------------------
  3901.  
  3902. Description   Sets the ROM BIOS keyboard typing rate.
  3903.  
  3904. Summary       VOID bkSetRepeatRate( Delay, Repeat );
  3905.               INT2       Delay           A value 0-3 that sets the 
  3906.                                          amount of delay before the 
  3907.                                          first repeat key is 
  3908.                                          generated.  See table A 
  3909.                                          below.
  3910.               INT2       Repeat          A value in the range 0-31 
  3911.                                          that specifies the repeat 
  3912.                                          rate in characters per 
  3913.                                          second.  See table B below.
  3914.  
  3915. Remarks       Table A
  3916.               -------------------
  3917.               Value   Delay(msec)
  3918.               0        250
  3919.               1        500
  3920.               2        750
  3921.               3        1000
  3922.  
  3923.                   Table B
  3924.               --------------------------
  3925.               Value   Repeate rate (cps)
  3926.               00          30.0
  3927.               01          26.7
  3928.               02          24.0
  3929.               03          21.8
  3930.               04          20.0
  3931.               05          18.5
  3932.               06          17.1
  3933.               07          16.0
  3934.               08          15.0
  3935.               09          13.3
  3936.               10          12.0
  3937.               11          10.9
  3938.               12          10.0
  3939.               13          9.2
  3940.               14          8.6
  3941.               15          8.0
  3942.               16          7.5
  3943.               17          6.7
  3944.               18          6.0
  3945.               19          5.5
  3946.               20          5.0
  3947.               21          4.6
  3948.               22          4.3
  3949.               23          4.0
  3950.               24          3.7
  3951.               25          3.3
  3952.               26          3.0
  3953.               27          2.7
  3954.               28          2.5
  3955.               29          2.3
  3956.               30          2.1
  3957.               31          2.0
  3958.  
  3959. Example       See program example 
  3960.  
  3961. Source        b160305d.asm
  3962.  
  3963. ----------------------------------------------------------------------
  3964. DosKbdClr            [2.0+]
  3965. ----------------------------------------------------------------------
  3966.  
  3967. Description   Clear the keyboard buffer.
  3968.  
  3969. Summary       VOID DosKbdClr( VOID );
  3970.  
  3971. Remarks       DosKbdClr uses DOS to clear any characters in the key 
  3972.               board buffer waiting to be read.
  3973.  
  3974. See Also      BiosKbdClr
  3975.  
  3976. Example       See program example 
  3977.  
  3978. Source        dkbdclr.asm
  3979.  
  3980. ----------------------------------------------------------------------
  3981. DosKbdGetElmt        [2.0+]
  3982. ----------------------------------------------------------------------
  3983.  
  3984. Description   Returns an integer value for the key pressed on the key 
  3985.               board.
  3986.  
  3987. Summary       INT2 DosKbdGetElmt( VOID );
  3988.  
  3989. Returns       DosKbdGetElmt will return an integer in the range of 
  3990.               0-388.  Use Appendix C to find the keyboard element 
  3991.               code this function returns for a particular key pressed 
  3992.               on the key board.  Key combinations using the control 
  3993.               key with an alpha character and all other ascii
  3994.               characters will be offset by 132.
  3995.  
  3996. See Also      BiosKbdGetElmt, BiosKbdRead, DosKbdRead
  3997.  
  3998. Example       See program example 
  3999.  
  4000. Source        dkbdelmt.asm
  4001.  
  4002. ----------------------------------------------------------------------
  4003. DosKbdHit            [2.0+]
  4004. ----------------------------------------------------------------------
  4005.  
  4006. Description   Reports if a keystroke is waiting to be read from the 
  4007.               key board buffer.
  4008.  
  4009. Summary       INT2 DosKbdHit( VOID );
  4010.  
  4011. Returns       0 or FALSE if a key is not in the keyboard buffer.
  4012.               1 or TRUE if a key is waiting to be read from the
  4013.               keyboard buffer.
  4014.  
  4015. Remarks       DosKbdHit checks the keyboard status to determine if a 
  4016.               key is waiting to be read from the keyboard buffer.
  4017.  
  4018. See Also      BiosKbdHit
  4019.  
  4020. Example       See program example 
  4021.  
  4022. Source        dkbdhit.asm
  4023.  
  4024. ----------------------------------------------------------------------
  4025. DosKbdRead        [2.0+]
  4026. ----------------------------------------------------------------------
  4027.  
  4028. Description   Read a character from the keyboard.
  4029.  
  4030. Summary       VOID DosKbdRead( Ch );
  4031.               CHAR       *Ch             returns a string of length 
  4032.                                          zero, one, or two bytes long 
  4033.                                          defining the key or key 
  4034.                                          combination pressed from the 
  4035.                                          keyboard.
  4036.  
  4037. Remarks       DosKbdRead reads a single character from the keyboard 
  4038.               buffer. DosKbdRead will return a zero, one, or two 
  4039.               character string.  A null string indicates Ctrl- Break 
  4040.               was pressed.  A one character string indicates an ascii 
  4041.               character and a two-charac
  4042.  
  4043.               ter string indicates a special extended  keyboard code. 
  4044.                Refer to appendix B for a list of the extended key 
  4045.               board codes.  The data type definition for DosKbdRead 
  4046.               is an untyped variable using a minimum of three bytes.
  4047.  
  4048. See Also      BiosKbdGetElmt, BiosKbdRead, DosKbdGetElmt
  4049.  
  4050. Example       See program example 
  4051.  
  4052. Source        dkbdread.asm
  4053.  
  4054. ----------------------------------------------------------------------
  4055. GetKey            [2.0+]
  4056. ----------------------------------------------------------------------
  4057.  
  4058. Description   Returns a keystroke and maps it into a keyboard element
  4059.  
  4060. number for EditSt.
  4061. Summary       INT2 GetKey( VOID );
  4062.  
  4063. Remarks       This function may call other functions and procedures.  
  4064.               The only restriction is that it must return an integer 
  4065.               value that is in the table found in Appendix C if the 
  4066.               function EditSt is used.  If EditSt is not used the 
  4067.               only restriction is that 
  4068.  
  4069.               an integer must be returned.
  4070.  
  4071. Example       See program example 6,7
  4072.  
  4073. Source        fpgetkey.asm
  4074.  
  4075.  
  4076.                                Chapter 7
  4077.                                   DOS
  4078.  
  4079.                   +--------------------------------+
  4080.                   |                                |
  4081.                   |    This section supports gen   |
  4082.                   |    eral DOS function calls.    |
  4083.                   |                                |
  4084.                   | Thank-you for supporting the   |
  4085.                   |        FlashPac Library        |
  4086.                   |                                |
  4087.                   +--------------------------------+
  4088.  
  4089. ----------------------------------------------------------------------
  4090. dChDir            [2.0+]
  4091. ----------------------------------------------------------------------
  4092.  
  4093. Description   Change to specified directory
  4094.  
  4095. Summary       INT dChDir( Path );
  4096.               CHAR       *Path           path to change to
  4097.  
  4098. Returns       0 - function successfully changed path
  4099.  
  4100. Example       See program example 
  4101.  
  4102. Source        d213B00d.asm
  4103.  
  4104. ----------------------------------------------------------------------
  4105. dCloseFile            [2.0+]
  4106. ----------------------------------------------------------------------
  4107.  
  4108. Description   Closes any file that was previously opened or created 
  4109.               with a call to dCreateFile or dOpenFile.
  4110.  
  4111. Summary       INT dCloseFile( Handle );
  4112.               INT2       Handle          handle of the file to close
  4113.  
  4114. Returns       0 if the function successfully closed file otherwise 
  4115.               the error code is returned.
  4116.  
  4117. Example       See program example 
  4118.  
  4119. Source        d213E00d.asm
  4120.  
  4121. ----------------------------------------------------------------------
  4122. dCreateFile        [2.0+]
  4123. ----------------------------------------------------------------------
  4124.  
  4125. Description   Creates a new file in the specified or default 
  4126.               directory on the specified or default drive.  If the 
  4127.               file already exists then the file is truncated to 
  4128.               length zero.
  4129.  
  4130. Summary       INT dCreateFile( Path, Attr, Handle );
  4131.               CHAR       *Path           path and filename of file to 
  4132.                                          cre ate
  4133.               INT2       Attr            attribute to create file 
  4134.                                          with
  4135.               INT2       *Handle         returns the handle of the 
  4136.                                          file created
  4137.  
  4138. Returns       0 is returned if function successfully created the file 
  4139.               other wise the error code is returned.
  4140.  
  4141. Example       See program example 
  4142.  
  4143. Source        d213C00d.asm
  4144.  
  4145. ----------------------------------------------------------------------
  4146. dCreateNewPsp        [1.1+]
  4147. ----------------------------------------------------------------------
  4148.  
  4149. Description   Copies current programs psp to a specified segment 
  4150.               address in free memory before updating the psp to make 
  4151.               it usable by another program.
  4152.  
  4153. Summary       VOID dCreateNewPsp( Segment );
  4154.               UINT2      Segment         Segment of the new psp
  4155.  
  4156. Example       See program example 
  4157.  
  4158. Source        d212600d.asm
  4159.  
  4160. ----------------------------------------------------------------------
  4161. dDelFile            [2.0+]
  4162. ----------------------------------------------------------------------
  4163.  
  4164. Description   Delete specified file from the disk.
  4165.  
  4166. Summary       INT dDelFile( FileSpec );
  4167.               CHAR       *FileSpec       ASCIIZ string containing the 
  4168.                                          drive path and filename of 
  4169.                                          the file to be deleted.
  4170.  
  4171. Returns       0 - file deleted ok
  4172.               1 - error trying to delete file
  4173.  
  4174. Example       See program example 
  4175.  
  4176. Source        d214100d.asm
  4177.  
  4178. ----------------------------------------------------------------------
  4179. dDiskReset            [1.1+]
  4180. ----------------------------------------------------------------------
  4181.  
  4182. Description   Flush all file buffers.  All data in the MS-DOS buffers 
  4183.               are physically written to the disk. The disk directory 
  4184.               is NOT updated.
  4185.  
  4186. Summary       VOID dDiskReset( VOID );
  4187.  
  4188. Example       See program example 
  4189.  
  4190. Source        d210D00d.asm
  4191.  
  4192. ----------------------------------------------------------------------
  4193. dGetBreakStatus        [2.0+]
  4194. ----------------------------------------------------------------------
  4195.  
  4196. Description   Get the status of the systems break flag that 
  4197.               influences ctrl-c checking.
  4198.  
  4199. Summary       INT dGetBreakStatus( VOID );
  4200.  
  4201. Returns       0 - Break flag is OFF
  4202.               1 - Break flag is ON
  4203.  
  4204. Example       See program example 
  4205.  
  4206. Source        d213300d.asm
  4207.  
  4208. ----------------------------------------------------------------------
  4209. dGetBusyFlag        [2.0+]
  4210. ----------------------------------------------------------------------
  4211.  
  4212. Description   Get the address of the MS-DOS busy flag
  4213.  
  4214. Summary       VOID dGetBusyFlag( dSeg, dOfs );
  4215.               UINT2      *dSeg           returns segment of dos busy 
  4216.                                          flag var
  4217.               UINT2      *dOfs           returns offset of dos busy 
  4218.                                          flag var
  4219.  
  4220. Remarks       This dos function is not documented and does work a 
  4221.               little differently between the different flavors of 
  4222.               dos.
  4223.  
  4224. Example       See program example 
  4225.  
  4226. Source        d213400u.asm
  4227.  
  4228. ----------------------------------------------------------------------
  4229. dGetCurrentDisk        [1.1+]
  4230. ----------------------------------------------------------------------
  4231.  
  4232. Description   Get the number of the default disk drive.
  4233.  
  4234. Summary       INT2 dGetCurrentDisk( VOID );
  4235.  
  4236. Returns       An integer representing the drive code of the default 
  4237.               disk drive where 0=A, 1=B, etc.
  4238.  
  4239. Example       See program example 
  4240.  
  4241. Source        d211900d.asm
  4242.  
  4243. ----------------------------------------------------------------------
  4244. dGetDate            [1.1+]
  4245. ----------------------------------------------------------------------
  4246.  
  4247. Description   Use Dos to retrieve the system date
  4248.  
  4249. Summary       VOID dGetDate( Month, Day, Year, DayOfWk );
  4250.               INT2       *Month          returns the month of the 
  4251.                                          year
  4252.               INT2       *Day            returns the day of the month
  4253.               INT2       *Year           returns the year (1980 thru 
  4254.                                          2099)
  4255.               INT2       *DayOfWk        returns the day of the week 
  4256.                                          ( 0-6 ) where 0=Sunday, 
  4257.                                          1=Monday,..., 6=Saturday.
  4258.  
  4259. Example       See program example 
  4260.  
  4261. Source        d212A00d.asm
  4262.  
  4263. ----------------------------------------------------------------------
  4264. dGetDriveData        [2.0+]
  4265. ----------------------------------------------------------------------
  4266.  
  4267. Description   Retrieve information about the default disk drive
  4268.  
  4269. Summary       INT dGetDriveData( Drive, Sectors, MediaSeg, 
  4270.               MediaOfs, SectorSize, Clusters );
  4271.               INT2       Drive           drive code of the drive to 
  4272.                                          get the data on. (0=default, 
  4273.                                          1=A, 2=B, etc.)
  4274.               UINT2      *Sectors        Number of sectors per 
  4275.                                          cluster
  4276.               UINT2      *MediaSeg       Segment of the media id byte
  4277.               UINT2      *MediaOfs       Offset of the media id byte
  4278.               UINT2      *SectorSize     Number of bytes per sector
  4279.               UINT2      *Clusters       Number of clusters on the 
  4280.                                          drive
  4281.  
  4282. Returns       0 - unsuccessful (invalid drive, etc)
  4283.               1 - successful
  4284.  
  4285. Example       See program example 
  4286.  
  4287. Source        d211C00d.asm
  4288.  
  4289. ----------------------------------------------------------------------
  4290. dGetDrvAllocInfo    [2.0]
  4291. ----------------------------------------------------------------------
  4292.  
  4293. Description   Get information about a specified disk drive.
  4294.  
  4295. Summary       INT dGetDrvAllocInfo( Drive, Sectors, AvailClusters, 
  4296.               BytesInSec, TotalClusters );
  4297.               UINT       Drive           disk drive code (0=default, 
  4298.                                          1=A, etc)
  4299.               UINT       *Sectors        number of sectors in a 
  4300.                                          cluster
  4301.               UINT       *AvailClusters  number of available clusters
  4302.               UINT       *BytesInSec     number of bytes in a sector
  4303.               UINT       *TotalClusters  number of clusters in drive
  4304.  
  4305. Returns       0 - function unable to obtain information for drive
  4306.               1 - function successfully obtained information
  4307.  
  4308. Example       See program example 
  4309.  
  4310. Source        d213600d.asm
  4311.  
  4312. ----------------------------------------------------------------------
  4313. dGetDta            [2.0+]
  4314. ----------------------------------------------------------------------
  4315.  
  4316. Description   Gets the current address of the disk transfer area 
  4317.               being used for file related functions.
  4318.  
  4319. Summary       VOID dGetDta( Segment, Offset );
  4320.               UINT2      *Segment        Segment of the DTA
  4321.               UINT2      *Offset         Offset of the DTA
  4322.  
  4323. Example       See program example 
  4324.  
  4325. Source        d212F00d.asm
  4326.  
  4327. ----------------------------------------------------------------------
  4328. dGetFileAttr        [2.0+]
  4329. ----------------------------------------------------------------------
  4330.  
  4331. Description   Gets the attribute for the specified file.
  4332.  
  4333. Summary       INT dGetFileAttr( FileSpec, Attr );
  4334.               CHAR       *FileSpec       handle of file to set file 
  4335.                                          pointer
  4336.               INT2       *Attr           relative position to set 
  4337.                                          location of pointer from
  4338.  
  4339. Returns       0 - file attribute obtained ok
  4340.               1 - error trying to obtain files attribute
  4341.  
  4342. Example       See program example 
  4343.  
  4344. Source        d214300d.asm
  4345.  
  4346. ----------------------------------------------------------------------
  4347. dGetIntVec            [2.0+]
  4348. ----------------------------------------------------------------------
  4349.  
  4350. Description   Get the address of the specified Interrupt
  4351.  
  4352. Summary       VOID dGetIntVec( dInt, dSeg, dOfs );
  4353.               UINT2      dInt            interrupt vector to retrieve
  4354.               UINT2      *dSeg           returns the segment of the 
  4355.                                          interrupt specified
  4356.               UINT2      *dOfs           returns the offset of the 
  4357.                                          interrupt specified
  4358.  
  4359. Example       See program example 
  4360.  
  4361. Source        d2135xxd.asm
  4362.  
  4363. ----------------------------------------------------------------------
  4364. dGetTime            [1.1+]
  4365. ----------------------------------------------------------------------
  4366.  
  4367. Description   Use Dos to retrieve the system time
  4368.  
  4369. Summary       VOID dGetTime( Hour, Minute, Seconds, Hundredths );
  4370.               INT2       *Hour           hour (0-23)
  4371.               INT2       *Minute         minutes (0-59)
  4372.               INT2       *Seconds        seconds (0-59)
  4373.               INT2       *Hundredths     hundredths of a second 
  4374.                                          (0-99)
  4375.  
  4376. Example       See program example 
  4377.  
  4378. Source        dd212C00d.asm
  4379.  
  4380. ----------------------------------------------------------------------
  4381. dGetVersion        [2.0+]
  4382. ----------------------------------------------------------------------
  4383.  
  4384. Description   Get the version number of the MS-DOS operating system.
  4385.  
  4386. Summary       VOID dGetVersion( Major, Minor );
  4387.               INT2       *Major          Major version number
  4388.               INT2       *Minor          Minor version number
  4389.  
  4390. Example       See program example 
  4391.  
  4392. Source        d213000d.asm
  4393.  
  4394. ----------------------------------------------------------------------
  4395. dMkDir            [2.0+]
  4396. ----------------------------------------------------------------------
  4397.  
  4398. Description   Create directory using specified path
  4399.  
  4400. Summary       INT2 dMkDir( Path );
  4401.               CHAR       *Path           ascii string of path to 
  4402.                                          create
  4403.  
  4404. Example       See program example 
  4405.  
  4406. Source        d213900d.asm
  4407.  
  4408. ----------------------------------------------------------------------
  4409. dOpenFile            [2.0+]
  4410. ----------------------------------------------------------------------
  4411.  
  4412. Description   Opens any existing file in the specified or default 
  4413.               directory on the specified or default drive.
  4414.  
  4415. Summary       INT dOpenFile( Path, Mode, Handle );
  4416.               CHAR       *Path           name of file to create
  4417.               INT2       Mode            access mode of file
  4418.               INT2       *Handle         returns handle of file 
  4419.                                          created
  4420.  
  4421. Returns       0 - function successfully changed path
  4422.  
  4423. Remarks       Value   Access
  4424.               0       read
  4425.               1       write
  4426.               2       read/write
  4427.  
  4428. Example       See program example 
  4429.  
  4430. Source        d213D00d.asm
  4431.  
  4432. ----------------------------------------------------------------------
  4433. dReadFile            [2.0+]
  4434. ----------------------------------------------------------------------
  4435.  
  4436. Description   Read specified number of bytes from file into data 
  4437.               buffer
  4438.  
  4439. Summary       INT dReadFile( Handle, NBytes, Buffer, BytesRead );
  4440.               INT        Handle          valid file handle of file to 
  4441.                                          read from
  4442.               UINT2      NBytes          number of bytes to read
  4443.               VOID       *Buffer         data area to place data read 
  4444.                                          from file
  4445.               UINT2      *BytesRead      number of actual bytes read
  4446.  
  4447. Returns       0 - file read performed ok
  4448.               1 - error trying to read file
  4449.  
  4450. Example       See program example 
  4451.  
  4452. Source        d213F00d.asm
  4453.  
  4454. ----------------------------------------------------------------------
  4455. dRmDir            [2.0+]
  4456. ----------------------------------------------------------------------
  4457.  
  4458. Description   Remove specified directory
  4459.  
  4460. Summary       INT dRmDir( Path );
  4461.               CHAR       *Path           path to remove
  4462.  
  4463. Returns       0 - function successfully created path
  4464.               n - error code
  4465.  
  4466. Example       See program example 
  4467.  
  4468. Source        d213A00d.asm
  4469.  
  4470. ----------------------------------------------------------------------
  4471. dSelectDisk            [1.1+]
  4472. ----------------------------------------------------------------------
  4473.  
  4474. Description   Sets the specified drive to the default drive and 
  4475.               returns the number of logical drives in the system.
  4476.  
  4477. Summary       INT2 dSelectDisk( Drive );
  4478.               INT2       Drive           drive number (0=A, 1=B, etc)
  4479.  
  4480. Returns       The number of logical drives.
  4481.  
  4482. Example       See program example 
  4483.  
  4484. Source        d210E00d.asm
  4485.  
  4486. ----------------------------------------------------------------------
  4487. dSetBreakFlag        [2.0+]
  4488. ----------------------------------------------------------------------
  4489.  
  4490. Description   Sets the break flag to ON or OFF
  4491.  
  4492. Summary       VOID dSetBreakFlag( flag );
  4493.               INT        flag            0 - to set break flag OFF
  4494.                                          1 - to set break flag ON
  4495.  
  4496. Example       See program example 
  4497.  
  4498. Source        d213301d.asm
  4499.  
  4500. ----------------------------------------------------------------------
  4501. dSetDate            [1.1+]
  4502. ----------------------------------------------------------------------
  4503.  
  4504. Description   Use Dos to set the system to a specified date
  4505.  
  4506. Summary       INT dSetDate( Month, Day, Year );
  4507.               INT        Month           month of year (1-12)
  4508.               INT        Day             day of month (1-31)
  4509.               INT        Year            year 1980-2099
  4510.  
  4511. Returns       0 - invalid date
  4512.               1 - date set successfully
  4513. Example       See program example 
  4514.  
  4515. Source        d213301d.asm
  4516.  
  4517. ----------------------------------------------------------------------
  4518. dSetDta            [1.1+]
  4519. ----------------------------------------------------------------------
  4520.  
  4521. Description   Sets the address of the disk transfer area to be used 
  4522.               for file related functions.
  4523.  
  4524. Summary       VOID dSetDta( Segment, Offset );
  4525.               UINT2      Segment         Segment of the new DTA
  4526.               UINT2      Offset          Offset of the new DTA
  4527.  
  4528. Example       See program example 
  4529.  
  4530. Source        d211A00d.asm
  4531.  
  4532. ----------------------------------------------------------------------
  4533. dSetFileAttr        [2.0+]
  4534. ----------------------------------------------------------------------
  4535.  
  4536. Description   Sets file position relative to beginning of file, 
  4537.               current file position, or end of file.
  4538.  
  4539. Summary       INT dGetFileAttr( FileSpec, Attr );
  4540.               CHAR       *FileSpec       handle of file to set file 
  4541.                                          pointer
  4542.               INT2       *Attr           relative position to set 
  4543.                                          location of pointer from
  4544.  
  4545. Returns       0 - file attribute obtained ok
  4546.               1 - error trying to obtain files attribute
  4547.  
  4548. Example       See program example 
  4549.  
  4550. Source        d214301d.asm
  4551.  
  4552. ----------------------------------------------------------------------
  4553. dSetFilePos            [2.0+]
  4554. ----------------------------------------------------------------------
  4555.  
  4556. Description   Sets file position relative to beginning of file, 
  4557.               current file position, or end of file.
  4558.  
  4559. Summary       INT dSetFilePos( Handle, Method, Ofs );
  4560.               INT2       Handle          handle of file to set file 
  4561.                                          pointer
  4562.               INT        Method          relative starting position 
  4563.                                          to set location of pointer
  4564.               INT4       *Ofs            number of bytes to move 
  4565.                                          pointer.   returns the 
  4566.                                          absolute file position from 
  4567.                                          the beginning of the file.
  4568.  
  4569. Returns       0 - file pointer moved ok
  4570.               1 - error trying to move file pointer
  4571.  
  4572. Remarks       Method   Description
  4573.               0   beginning of file
  4574.               1   current location of file pointer
  4575.               2   EOF location
  4576.  
  4577. Example       See program example 
  4578.  
  4579. Source        d214200d.asm
  4580.  
  4581. ----------------------------------------------------------------------
  4582. dSetInt            [1.1+]
  4583. ----------------------------------------------------------------------
  4584.  
  4585. Description   Initialize the systems interrupt vector to point to a 
  4586.               user defined interrupt handling routine.
  4587.  
  4588. Summary       VOID dSetInt( Intr, Segment, Offset );
  4589.               UINT2      Intr            Interrupt number
  4590.               UINT2      Segment         Segment of the new interrupt 
  4591.                                          routine
  4592.               UINT2      Offset          Offset of the new interrupt 
  4593.                                          rou tine
  4594.  
  4595. Example       See program example 
  4596.  
  4597. Source        d2125xxd.asm
  4598.  
  4599. ----------------------------------------------------------------------
  4600. dSetTime            [1.1+]
  4601. ----------------------------------------------------------------------
  4602.  
  4603. Description   Use Dos to set the system clock to a specified time
  4604.  
  4605. Summary       VOID dSetTime( Hour, Minute, Seconds, Hundredths );
  4606.               INT2       Hour            hour (0-23)
  4607.               INT2       Minute          minute (0-59)
  4608.               INT2       Seconds         seconds (0-59)
  4609.               INT2       Hundredths      hundredths of a second 
  4610.                                          (0-99)
  4611. Return        0 - invalid time
  4612.               1 - time set successfully
  4613.  
  4614. Example       See program example 
  4615.  
  4616. Source        d212D00d.asm
  4617.  
  4618. ----------------------------------------------------------------------
  4619. dSetVerityFlag        [1.1+]
  4620. ----------------------------------------------------------------------
  4621.  
  4622. Description   Turns the automatic read-after-write verification ON or 
  4623.               OFF.
  4624.  
  4625. Summary       VOID dSetVerifyFlag( VerifyOpt );
  4626.               INT2       VerifyOpt       0 - Turn OFF verify flag
  4627.                                          1 - Turn ON verify flag
  4628.  
  4629. Example       See program example 
  4630.  
  4631. Source        d212E00d.asm
  4632.  
  4633. ----------------------------------------------------------------------
  4634. dWriteFile            [2.0+]
  4635. ----------------------------------------------------------------------
  4636.  
  4637. Description   Write specified number of bytes to file from data 
  4638.               buffer
  4639.  
  4640. Summary       INT dWriteFile( Handle, NBytes, Buffer, BytesWritten );
  4641.               INT        Handle          valid file handle of file to 
  4642.                                          write to
  4643.               UINT       NBytes          number of bytes to write
  4644.               VOID       *Buffer         data area containing data to 
  4645.                                          write
  4646.               UINT       *BytesWritten   number of actual bytes 
  4647.                                          written
  4648.               Return     0               - file write operation 
  4649.                                          performed ok
  4650.               1          -               error trying to write file
  4651.  
  4652. Example       See program example 
  4653.  
  4654. Source        d214000d.asm
  4655.  
  4656.  
  4657.  
  4658.                                Chapter 8
  4659.                                 DOS I/O
  4660.  
  4661.                   +--------------------------------+
  4662.                   |                                |
  4663.                   |    This section supports DOS   |
  4664.                   |    file functions, including   |
  4665.                   |  func tions to handle critical |
  4666.                   |             errors.            |
  4667.                   |                                |
  4668.                   | Thank-you for supporting the   |
  4669.                   |        FlashPac Library        |
  4670.                   |                                |
  4671.                   +--------------------------------+
  4672.  
  4673.  
  4674. Global Structures
  4675. typedef TFindRec 
  4676.     {
  4677.     UINT2    Attr;
  4678.     UINT2    Time;
  4679.     UINT2    Date;
  4680.     UINT4    Size;
  4681.     UCHAR    Name[13];
  4682.     } TFindRec;
  4683.  
  4684.  
  4685. INT2   DosErrNo   the error code for function result errors.
  4686.  
  4687. INT2   CErrCode   the error code for critical errors.
  4688.  
  4689. INT2   CErrType   contains the type of device for the critical error.
  4690.                   0 = Block device
  4691.                   1 = Character device
  4692.  
  4693. INT2   CErrDrive  contains the number of the disk drive where the
  4694.                   critical error occurred.  If the critical error is
  4695.                   not a disk drive the value will then remain as -1.
  4696.  
  4697. CHAR   CErrDevice[9]   contains the name of the device in error.
  4698.  
  4699. ----------------------------------------------------------------------
  4700. CloseFile
  4701. ----------------------------------------------------------------------
  4702.  
  4703. Description   Closes a file and flushes all file buffers for a file.
  4704.  
  4705. Summary       VOID CloseFile( Handle );
  4706.               INT2       Handle          the handle number of a file 
  4707.                                          that was opened using the 
  4708.                                          OpenFile operation.
  4709.  
  4710. Remarks       If an error occurred DosErrNo will contain one of the 
  4711.               follow ing error codes.
  4712.  
  4713.               DosErrNo   Description
  4714.               6          Invalid file handle
  4715.  
  4716. Example       See program example 
  4717.  
  4718. Source        closefil.asm
  4719.  
  4720. ----------------------------------------------------------------------
  4721. CreateFile
  4722. ----------------------------------------------------------------------
  4723.  
  4724. Description   Opens an existing file or creates a new file if it does 
  4725.               not exist.
  4726.  
  4727. Summary       VOID CreateFile( Path, Attr, Handle );
  4728.               CHAR       *Path           filename of file to be 
  4729.                                          opened or  created.
  4730.               INT2       Attr            mode to set the file's 
  4731.                                          attribute to.
  4732.               INT2       *Handle         returns an integer that this 
  4733.                                          file is associated with for 
  4734.                                          access.
  4735.  
  4736. Remarks       This operation will open a new or existing file for 
  4737.               read/write access. CreateFile assumes that the file is 
  4738.               opened as an output file and will set the length of any 
  4739.               existing file to zero.  If any errors occur DosErrNo 
  4740.               will have the error code.
  4741.  
  4742.               DosErrNo   Description
  4743.               3          Path not found
  4744.               4          No handle available
  4745.               5          Access denied
  4746.               6          Invalid file handle
  4747.  
  4748. Example       See program example 
  4749.  
  4750. Source        creatfil.asm
  4751.  
  4752. ----------------------------------------------------------------------
  4753. DosFindFirst
  4754. ----------------------------------------------------------------------
  4755.  
  4756. Description   Find the first file that matches the given filespec and 
  4757.               attributes.
  4758.  
  4759. Summary       VOID DosFindFirst( Path, Attr, FindRec );
  4760.               CHAR       *Path           path and filename of file to 
  4761.                                          search for.
  4762.               INT2       Attr            attributes of files to 
  4763.                                          include in search
  4764.               TFindRec   FindRec         result of search is returned 
  4765.                                          in a variable of TFindRec. 
  4766.                                          (See Global Structures page 
  4767.                                          8-1).
  4768.  
  4769. Remarks       This operation will search for the specified file.  The 
  4770.               charac ters * and ? may be used for the filespec.  If 
  4771.               any errors occur the error code will be set in 
  4772.               DosErrNo.
  4773.  
  4774.               DosErrNo   Description
  4775.               2          Directory not found
  4776.               3          Path not found
  4777.               18         No more files
  4778.  
  4779.               The search attribute values may be one or any 
  4780.               combination of values.  (e.g. to search for a hidden 
  4781.               system file use value 6).
  4782.  
  4783.               Bit(s)   Value   Description
  4784.               0         1      read-only
  4785.               1         2      hidden
  4786.               2         4      system
  4787.               3         8      volume label
  4788.               4         16     directory
  4789.               5         32     archive
  4790.               6-15             reserved
  4791.  
  4792. See Also      DosFindNext
  4793.  
  4794. Example       See program example 
  4795.  
  4796. Source        findf.asm
  4797.  
  4798. ----------------------------------------------------------------------
  4799. DosFindNext
  4800. ----------------------------------------------------------------------
  4801.  
  4802. Description   Returns the next file entry that matches the filespec 
  4803.               and attributes used in a previous call to DosFindFirst.
  4804.  
  4805. Summary       VOID DosFindNext( FindRec );
  4806.               TFindRec   FindRec         the result of the search is 
  4807.                                          returned in the variable of 
  4808.                                          TFindRec. (See Global Struc 
  4809.                                          tures page 8-1).
  4810.  
  4811. Remarks       DosFindNext must be called after DosFindFirst and 
  4812.               before any other calls that transfer data into the DTA 
  4813.               at the time of the call to  DosFindFirst.
  4814.  
  4815.               DosErrNo   Description
  4816.               18   No more files
  4817.  
  4818. See Also      DosFindFirst
  4819.  
  4820. Example       See program example 
  4821.  
  4822. Source        findn.asm
  4823.  
  4824. ----------------------------------------------------------------------
  4825. FSeek
  4826. ----------------------------------------------------------------------
  4827.  
  4828. Description   Change the logical read/write position of the file 
  4829.               pointer.
  4830.  
  4831. Summary       UINT4 FSeek( Handle, Origin, Offset );
  4832.               INT        Handle          file handle that was 
  4833.                                          assigned to a file using 
  4834.                                          either the OpenFile or 
  4835.                                          CreateFile operation.
  4836.               INT        Origin          gives the starting location 
  4837.                                          to use when moving the file 
  4838.                                          pointer.
  4839.  
  4840.                                          Method   Description
  4841.                                          0   beginning of file
  4842.                                          1   current location of file ptr
  4843.                                          2   EOF location
  4844.               INT4       Offset          gives the number of bytes to
  4845.               move       the             file pointer.
  4846.  
  4847. Remarks       This operation will move the file pointer for the 
  4848.               specified number of bytes given.  On return this 
  4849.               function reports the number of bytes the file pointer 
  4850.               is from the beginning of the file.  If any errors occur 
  4851.               DosErrNo will have the error code.
  4852.  
  4853.               DosErrNo   Description
  4854.               1   Invalid method code
  4855.               6   Invalid file handle
  4856.  
  4857. Example       See program example 
  4858.  
  4859. Source        fseek.asm
  4860.  
  4861. ----------------------------------------------------------------------
  4862. GetDir
  4863. ----------------------------------------------------------------------
  4864.  
  4865. Description   Returns an asciiz string that describes the current 
  4866.               path from the root of the specified drive.
  4867.  
  4868. Summary       VOID GetDir( Drive, Path );
  4869.               INT2       Drive           Number of the drive to get 
  4870.                                          the current path, where 
  4871.                                          drive code is 0=default, 
  4872.                                          1=A, 2=B, etc.
  4873.               CHAR       *Path           Path is the buffer area that 
  4874.                                          will contain the asciiz 
  4875.                                          string of the current  
  4876.                                          directory.
  4877.  
  4878. Example       See program example 
  4879.  
  4880. Source        getdir.asm
  4881.  
  4882. ----------------------------------------------------------------------
  4883. GetDrive
  4884. ----------------------------------------------------------------------
  4885.  
  4886. Description   Reports the current default disk drive
  4887.  
  4888. Summary       INT2 GetDrive( VOID );
  4889.  
  4890. Remarks       GetDrive returns an integer to indicate which disk 
  4891.               drive is the  current default drive where:
  4892.               Drive A = 1
  4893.               Drive B = 2
  4894.               Drive C = 3
  4895.  
  4896. Example       See program example 
  4897.  
  4898. Source        getdrive.asm
  4899.  
  4900. ----------------------------------------------------------------------
  4901. GetDTA
  4902. ----------------------------------------------------------------------
  4903.  
  4904. Description   Returns the current disk transfer area
  4905.  
  4906. Summary       VOID GetDTA( Segment, Offset );
  4907.               UINT2      Segment         returns segment of current 
  4908.                                          DTA.
  4909.               UINT2      Offset          returns offset of current 
  4910.                                          DTA.
  4911.  
  4912. Example       See program example 
  4913.  
  4914. Source        getdta.asm
  4915.  
  4916. ----------------------------------------------------------------------
  4917. GetFileSize
  4918. ----------------------------------------------------------------------
  4919.  
  4920. Description   Report the number of bytes in a disk file.
  4921.  
  4922. Summary       INT4 GetFileSize( Handle );
  4923.               INT        Handle          gives a file handle that was 
  4924.                                          assigned to a file using the 
  4925.                                          OpenFile or CreateFile opera 
  4926.                                          tion.
  4927.  
  4928. Remarks       GetFileSize reports the number of bytes in the file 
  4929.               associ ated with the handle number.
  4930.  
  4931. Example       See program example 
  4932.  
  4933. Source        gfilsize.asm
  4934.  
  4935. ----------------------------------------------------------------------
  4936. GetNDrvs
  4937. ----------------------------------------------------------------------
  4938.  
  4939. Description   Report the number of disk drives.
  4940.  
  4941. Summary       INT2 GetNDrvs( VOID );
  4942.  
  4943. Remarks       GetNDrvs reports the total number of diskette and fixed 
  4944.               disk drives installed for the current system.
  4945.  
  4946. Example       See program example 
  4947.  
  4948. Source        getndrvs.asm
  4949.  
  4950. ----------------------------------------------------------------------
  4951. OpenFile
  4952. ----------------------------------------------------------------------
  4953.  
  4954. Description   Open the file given in the string passed.
  4955.  
  4956. Summary       VOID OpenFile( Path, Attr, Handle );
  4957.               CHAR       *Path           path and filename of file to 
  4958.                                          open.
  4959.               INT2       Attr            type of access allowed for 
  4960.                                          this file.
  4961.  
  4962.                                          Access   Description
  4963.                                          0   Read Only
  4964.                                          1   Write Only
  4965.                                          2   Read/write
  4966.               INT2       *Handle         returns an integer that 
  4967.                                          repre sents the file handle 
  4968.                                          that is associated with the 
  4969.                                          file given in Path.  The 
  4970.                                          file handle is to be used 
  4971.                                          when any operations on the 
  4972.                                          file are to take place.
  4973.  
  4974. Remarks       If an error occurred DosErrNo will contain one of the 
  4975.               follow ing  error codes.
  4976.  
  4977.               DosErrNo   Description
  4978.               2          File not found
  4979.               4          No handle available
  4980.               5          access denied
  4981.               12         invalid access code
  4982.  
  4983. See Also      CreateFile
  4984.  
  4985. Example       See program example 
  4986.  
  4987. Source        openfile.asm
  4988.  
  4989. ----------------------------------------------------------------------
  4990. ReadFile
  4991. ----------------------------------------------------------------------
  4992.  
  4993. Description   Read a file or device for a specified number of bytes.
  4994.  
  4995. Summary       VOID ReadFile( Handle, NBytes, Buffer, RBytes );
  4996.               INT2       Handle          file handle associated with 
  4997.                                          the appropriate file or 
  4998.                                          device for read operation.
  4999.               INT2       NBytes          number of bytes to read from 
  5000.                                          file or device.
  5001.               CHAR       *Buffer         buffer area to place data 
  5002.                                          read.
  5003.               UINT2      *RBytes         returns number of bytes 
  5004.                                          actually read from the file 
  5005.                                          or device.  If RBytes is 
  5006.                                          zero then an attempt was 
  5007.                                          made to read from the end of 
  5008.                                          a file.
  5009.  
  5010. Remarks       If an error occurred DosErrNo will contain one of the 
  5011.               follow ing error codes.
  5012.  
  5013.               DosErrNo   Description
  5014.               5          Access denied
  5015.               6          Invalid handle
  5016.  
  5017. Example       See program example 
  5018.  
  5019. Source        readfile.asm
  5020.  
  5021. ----------------------------------------------------------------------
  5022. ResetDisk
  5023. ----------------------------------------------------------------------
  5024.  
  5025. Description   Resets the disk and flushes all file buffers.
  5026.  
  5027. Summary       VOID ResetDisk( VOID );
  5028.  
  5029. Remarks       This routine does not close any files.  To ensure that 
  5030.               the length of a file is recorded properly in the file 
  5031.               directory you should first close the file before using 
  5032.               this routine.
  5033.  
  5034. Example       See program example 
  5035.  
  5036. Source        resetdsk.asm
  5037.  
  5038. ----------------------------------------------------------------------
  5039. ResetErrCodes
  5040. ----------------------------------------------------------------------
  5041.  
  5042. Description   Resets global variables that indicate device errors to 
  5043.               their initial  settings.
  5044.  
  5045. Summary       VOID ResetErrCodes( VOID );
  5046.  
  5047. Remarks       The following variables are set as followings:
  5048.  
  5049.               DosErrNo   =  0
  5050.               CErrCode   =  0
  5051.               CErrType   = -1
  5052.               CErrDrive  = -1
  5053.               CErrDevice = ''
  5054.  
  5055. See Also      SetInt24
  5056.  
  5057. Example       See program example 
  5058.  
  5059. Source        setint24.asm
  5060.  
  5061. ----------------------------------------------------------------------
  5062. RestInt24
  5063. ----------------------------------------------------------------------
  5064.  
  5065. Description   Uninstalls or restores the programs critical interrupt 
  5066.               error handler.
  5067.  
  5068. Summary       VOID RestInt24( VOID );
  5069.  
  5070. Remarks       This procedure will uninstall the critical interrupt 
  5071.               error han dler that was installed with the SetInt24 
  5072.               procedure.  This procedure uses the SegInt24 and 
  5073.               OfsInt24 variables to restore the interrupt handler in 
  5074.               use before the interrupt handler was installed.
  5075.  
  5076. Example       See program example 
  5077.  
  5078. Source        setint24.asm
  5079.  
  5080. ----------------------------------------------------------------------
  5081. SetDTA
  5082. ----------------------------------------------------------------------
  5083.  
  5084. Description   Set the file attribute for the file specified.
  5085.  
  5086. Summary       VOID SetDTA( Segment, Offset );
  5087.               UINT2      Segment         segment address for new DTA.
  5088.               UINT2      Offset          offset within segment for 
  5089.                                          new DTA.
  5090.  
  5091. Example       See program example 
  5092.  
  5093. Source        setdta.asm
  5094.  
  5095. ----------------------------------------------------------------------
  5096. SetInt24
  5097. ----------------------------------------------------------------------
  5098.  
  5099. Description   Initializes the critical error handler routine and its 
  5100.               global variables for use with your system.
  5101.  
  5102. Summary       VOID SetInt24( VOID );
  5103.  
  5104. Remarks       Only one call needs to be made to this routine for a 
  5105.               program that wants to use the critical error handler 
  5106.               routine.  In the event of a critical error, the 
  5107.               variables DosErrNo, CErrCode, CErrType, CErrDrive and 
  5108.               CErrDevice are set to the appro pr
  5109.  
  5110.               iate values. Refer to the global variable section at 
  5111.               the beginning of this chapter for a description of each 
  5112.               variable name.
  5113.  
  5114.               The following are the I/O error values that are set in 
  5115.               the         CErrCode global variable.  These codes 
  5116.               match the same codes DOS function 59h (Get Extended 
  5117.               Error Code) return.  Note that all values are 
  5118.               hexadecimal.
  5119.  
  5120.               Error
  5121.               Code   Description
  5122.               13     Write-protect error
  5123.               14     Unknown unit
  5124.               15     Disk drive not ready
  5125.               16     Unknown command
  5126.               17     Data error (bad CRC)
  5127.               18     A bad request structure length
  5128.               19     Data seek error
  5129.               1A     Unknown media type
  5130.               1B     Disk sector not found
  5131.               1C     Printer is out of paper
  5132.               1D     Write fault
  5133.               1E     Read fault
  5134.               1F     General failure
  5135.  
  5136. See Also      ResetErrCodes, RestInt24
  5137.  
  5138. Example       See program example 
  5139.  
  5140. Source        setint24.asm
  5141.  
  5142. ----------------------------------------------------------------------
  5143. WriteFile
  5144. ----------------------------------------------------------------------
  5145.  
  5146. Description   Write to a file or device for a specified number of 
  5147.               bytes.
  5148.  
  5149. Summary       VOID WriteFile( Handle, NBytes, Buffer, WBytes );
  5150.               INT2       Handle          file handle associated with 
  5151.                                          a file or device for read 
  5152.                                          operation to act on.
  5153.               INT2       NBytes          number of bytes to write to 
  5154.                                          file or device.
  5155.               CHAR       *Buffer         data area that contains the 
  5156.                                          data that is to be written 
  5157.                                          to the file or device.
  5158.               UINT2      *WBytes         returns actual number of 
  5159.                                          bytes written out to the 
  5160.                                          file or device.
  5161.  
  5162. Remarks       DosErrNo will contain one of the following error codes 
  5163.               when an error occurs.
  5164.  
  5165.               DosErrNo   Description
  5166.               5          Access denied
  5167.               6          Invalid handle
  5168.               20         insufficient disk space
  5169.  
  5170. Example       See program example 
  5171.  
  5172. Source        writefile.asm
  5173.  
  5174.  
  5175.  
  5176.                                Chapter 9
  5177.                                 Printer
  5178.  
  5179.                   +--------------------------------+
  5180.                   |                                |
  5181.                   |  The functions in this section |
  5182.                   |     use the BIOS and DOS to    |
  5183.                   |      support the printer.      |
  5184.                   |                                |
  5185.                   | Thank-you for supporting the   |
  5186.                   |        FlashPac Library        |
  5187.                   |                                |
  5188.                   +--------------------------------+
  5189.  
  5190. ----------------------------------------------------------------------
  5191. BiosPrtChar
  5192. ----------------------------------------------------------------------
  5193.  
  5194. Description   Send a character to the printer.
  5195.  
  5196. Summary       VOID BiosPrtChar( Ch, PrtNo );
  5197.               CHAR       Ch              character to print.
  5198.               INT2       PrtNo           printer number of printer to 
  5199.                                          print to.
  5200.  
  5201. Remarks       PrtNo 1 = LPT1:
  5202.               PrtNo 2 = LPT2:
  5203.               PrtNo 3 = LPT3:
  5204.  
  5205. Example       See program example 
  5206.  
  5207. Source        bprtchar.asm
  5208.  
  5209. ----------------------------------------------------------------------
  5210. BiosPrtInit
  5211. ----------------------------------------------------------------------
  5212.  
  5213. Description   Initialize the printer
  5214.  
  5215. Summary       INT2 BiosPrtInit( PrtNo );
  5216.               INT2       PrtNo           number of printer to 
  5217.                                          initialize.
  5218.  
  5219. Returns       This functions returns the status of the printer after 
  5220.               the initialization process is completed.
  5221.  
  5222. Example       See program example 
  5223.  
  5224. Source        bprtinit.asm
  5225.  
  5226. ----------------------------------------------------------------------
  5227. BiosPrtStatus
  5228. ----------------------------------------------------------------------
  5229.  
  5230. Description   Returns the current status of the printer.
  5231.  
  5232. Summary       INT2 BiosPrtStat( PrtNo );
  5233.               INT2       PrtNo           an integer representing the 
  5234.                                          printer number to check 
  5235.                                          status on.
  5236.  
  5237. Returns       PrtStatus will return an integer giving the status of 
  5238.               the printer using the following bit values.
  5239.  
  5240.  
  5241.               Bit  Value   Description
  5242.                0    1      Time-out
  5243.                1    2      Not used
  5244.                2    4      Not used
  5245.                3    8      I/O error
  5246.                4    16     Printer selected
  5247.                5    32     Out-of-paper signal
  5248.                6    64     Acknowledgment from printer
  5249.                7    128    Printer not busy
  5250.  
  5251. Example       See program example 
  5252.  
  5253. Source        bprtstat.asm
  5254.  
  5255. ----------------------------------------------------------------------
  5256. DosPrtChar
  5257. ----------------------------------------------------------------------
  5258.  
  5259. Description   Send a character to the printer.
  5260.  
  5261. Summary       VOID DosPrtChar( Ch );
  5262.               CHAR       Ch              character to print.
  5263.  
  5264. See Also      BiosPrtChar, BiosPrtStat
  5265.  
  5266. Example       See program example 
  5267.  
  5268. Source        prtchar.asm
  5269.  
  5270.  
  5271.  
  5272.                               Appendix A
  5273.                          Keyboard Return Codes
  5274.  
  5275.                   +--------------------------------+
  5276.                   |                                |
  5277.                   |   This appendix lists the key  |
  5278.                   |  board codes for all the key   |
  5279.                   |  combinations on the key board |
  5280.                   |   as they are interpreted by   |
  5281.                   |      the function ReadKbd.     |
  5282.                   |                                |
  5283.                   | Thank-you for supporting the   |
  5284.                   |        FlashPac Library        |
  5285.                   |                                |
  5286.                   +--------------------------------+
  5287.  
  5288. The ReadKbd function will return all key information into either a 
  5289. one or two character code.
  5290.  
  5291. To understand the table below assume St is a two character string.  
  5292. St[0] is the length of the character code returned.  If the length of 
  5293. St is one then a normal ASCII character was pressed, otherwise an 
  5294. extended code is generated.  Notice that some 
  5295.  
  5296. of the keyboard codes do produce a two character code with the first 
  5297. character being null.
  5298.  
  5299. If the length of St is one then a normal ASCII character code was 
  5300. read from the keyboard.  This covers the ASCII values 32-127.
  5301.  
  5302. If the length of St is two then one of the keys that are usually used 
  5303. for cursor control was read from the keyboard.  If this is the case 
  5304. then St[1] will be either a 0 or 27 depending on the key combination 
  5305. read from the keyboard.
  5306.  
  5307. Use of the switch statement works well with this type of setup to 
  5308. determine which keyboard keys were read.
  5309.  
  5310. switch Ch[1] {
  5311.    case 0   : printf( "Control code used." ); break;
  5312.    case 27   : printf( "Control code used." ); break;
  5313.    default   : if ( Ch[1] >= 32 && Ch[1] <= 127 )
  5314.       printf( "Printable code used." );
  5315. };
  5316.  
  5317. Key
  5318. Pressed   CH[0]   CH[1]   CH[2]
  5319. -------   -----   -----   -----
  5320. (space)     1      32       0
  5321. !           1      33       0
  5322. "           1      34       0
  5323. #           1      35       0
  5324. $           1      36       0
  5325. %           1      37       0
  5326. &           1      38       0
  5327. '           1      39       0
  5328. (           1      40       0
  5329. )           1      41       0
  5330. *           1      42       0
  5331. +           1      43       0
  5332. ,           1      44       0
  5333. -           1      45       0
  5334. /           1      47       0
  5335. 0           1      48       0
  5336. 1           1      49       0
  5337. 2           1      50       0
  5338. 3           1      51       0
  5339. 4           1      52       0
  5340. 5           1      53       0
  5341. 6           1      54       0
  5342. 7           1      55       0
  5343. 8           1      56       0
  5344. 9           1      57       0
  5345. :           1      58       0
  5346. ;           1      59       0
  5347. <           1      60       0
  5348. =           1      61       0
  5349. ?           1      63       0
  5350. @           1      64       0
  5351. A           1      65       0
  5352. B           1      66       0
  5353. C           1      67       0
  5354. D           1      68       0
  5355. E           1      69       0
  5356. F           1      70       0
  5357. G           1      71       0
  5358. H           1      72       0
  5359. I           1      73       0
  5360. J           1      74       0
  5361. K           1      75       0
  5362. L           1      76       0
  5363. M           1      77       0
  5364. N           1      78       0
  5365. O           1      79       0
  5366. P           1      80       0
  5367. Q           1      81       0
  5368. R           1      82       0
  5369. S           1      83       0
  5370. T           1      84       0
  5371. U           1      85       0
  5372. V           1      86       0
  5373. W           1      87       0
  5374. X           1      88       0
  5375. Y           1      89       0
  5376. Z           1      90       0
  5377. [           1      91       0
  5378. \           1      92       0
  5379. ]           1      93       0
  5380. ^           1      94       0
  5381. _           1      95       0
  5382. `           1      96       0
  5383. a           1      97       0
  5384. b           1      98       0
  5385. c           1      99       0
  5386. d           1      100      0
  5387. e           1      101      0
  5388. f           1      102      0
  5389. g           1      103      0
  5390. h           1      104      0
  5391. i           1      105      0
  5392. j           1      106      0
  5393. k           1      107      0
  5394. l           1      108      0
  5395. m           1      109      0
  5396. n           1      110      0
  5397. o           1      111      0
  5398. p           1      112      0
  5399. q           1      113      0
  5400. r           1      114      0
  5401. s           1      115      0
  5402. t           1      116      0
  5403. u           1      117      0
  5404. v           1      118      0
  5405. w           1      119      0
  5406. x           1      120      0
  5407. y           1      121      0
  5408. z           1      122      0
  5409. {           1      123      0
  5410. |           1      124      0
  5411. }           1      125      0
  5412. ~           1      126      0
  5413. Ctrl-Break  2      27       0
  5414. Esc         2      27       1
  5415. Ctrl-2      2      27       3
  5416. BackSp      2      27       8
  5417. Tab         2      27       9
  5418. Ctrl-Enter  2      27       10
  5419. Enter       2      27       13
  5420. Ctrl-BS     2      27       14
  5421. Shft-Tab    2      27       15
  5422. Alt-Q       2      27       16
  5423. Alt-W       2      27       17
  5424. Alt-E       2      27       18
  5425. Alt-R       2      27       19
  5426. Alt-T       2      27       20
  5427. Alt-Y       2      27       21
  5428. Alt-U       2      27       22
  5429. Alt-I       2      27       23
  5430. Alt-O       2      27       24
  5431. Alt-P       2      27       25
  5432. Alt-A       2      27       30
  5433. Alt-S       2      27       31
  5434. Alt-D       2      27       32
  5435. Alt-F       2      27       33
  5436. Alt-G       2      27       34
  5437. Alt-H       2      27       35
  5438. Alt-J       2      27       36
  5439. Alt-K       2      27       37
  5440. Alt-L       2      27       38
  5441. Alt-Z       2      27       44
  5442. Alt-X       2      27       45
  5443. Alt-C       2      27       46
  5444. Alt-V       2      27       47
  5445. Alt-B       2      27       48
  5446. Alt-N       2      27       49
  5447. Alt-M       2      27       50
  5448. F1          2      27       59
  5449. F2          2      27       60
  5450. F3          2      27       61
  5451. F4          2      27       62
  5452. F5          2      27       63
  5453. F6          2      27       64
  5454. F7          2      27       65
  5455. F8          2      27       66
  5456. F9          2      27       67
  5457. F10         2      27       68
  5458. Home        2      27       71
  5459. UArr        2      27       72
  5460. PgUp        2      27       73
  5461. LArr        2      27       75
  5462. RArr        2      27       77
  5463. End         2      27       79
  5464. DArr        2      27       80
  5465. PgDn        2      27       81
  5466. Ins         2      27       82
  5467. Del         2      27       83
  5468. Shft-F1     2      27       84
  5469. Shft-F2     2      27       85
  5470. Shft-F3     2      27       86
  5471. Shft-F4     2      27       87
  5472. Shft-F5     2      27       88
  5473. Shft-F6     2      27       89
  5474. Shft-F7     2      27       90
  5475. Shft-F8     2      27       91
  5476. Shft-F9     2      27       92
  5477. Shft-F10    2      27       93
  5478. Ctrl-F1     2      27       94
  5479. Ctrl-F2     2      27       95
  5480. Ctrl-F3     2      27       96
  5481. Ctrl-F4     2      27       97
  5482. Ctrl-F5     2      27       98
  5483. Ctrl-F6     2      27       99
  5484. Ctrl-F7     2      27       100
  5485. Ctrl-F8     2      27       101
  5486. Ctrl-F9     2      27       102
  5487. Ctrl-F10    2      27       103
  5488. Alt-F1      2      27       104
  5489. Alt-F2      2      27       105
  5490. Alt-F3      2      27       106
  5491. Alt-F4      2      27       107
  5492. Alt-F5      2      27       108
  5493. Alt-F6      2      27       109
  5494. Alt-F7      2      27       110
  5495. Alt-F8      2      27       111
  5496. Alt-F9      2      27       112
  5497. Alt-F10     2      27       113
  5498. Ctrl-LArr   2      27       115
  5499. Ctrl-RArr   2      27       116
  5500. Ctrl-End    2      27       117
  5501. Ctrl-PgDn   2      27       118
  5502. Ctrl-Home   2      27       119
  5503. Alt-1       2      27       120
  5504. Alt-2       2      27       121
  5505. Alt-3       2      27       122
  5506. Alt-4       2      27       123
  5507. Alt-5       2      27       124
  5508. Alt-6       2      27       125
  5509. Alt-7       2      27       126
  5510. Alt-8       2      27       127
  5511. Alt-9       2      27       128
  5512. Alt-0       2      27       129
  5513. Alt--       2      27       130
  5514. Alt-=       2      27       131
  5515. Ctrl-PgUp   2      27       132
  5516. Ctrl-A      2      0        1
  5517. Ctrl-B      2      0        2
  5518. Ctrl-C      2      0        3
  5519. Ctrl-D      2      0        4
  5520. Ctrl-E      2      0        5
  5521. Ctrl-F      2      0        6
  5522. Ctrl-G      2      0        7
  5523. Ctrl-H      2      0        8
  5524. Ctrl-I      2      0        9
  5525. Ctrl-J      2      0        10
  5526. Ctrl-K      2      0        11
  5527. Ctrl-L      2      0        12
  5528. Ctrl-M      2      0        13
  5529. Ctrl-N      2      0        14
  5530. Ctrl-O      2      0        15
  5531. Ctrl-P      2      0        16
  5532. Ctrl-Q      2      0        17
  5533. Ctrl-R      2      0        18
  5534. Ctrl-S      2      0        19
  5535. Ctrl-T      2      0        20
  5536. Ctrl-U      2      0        21
  5537. Ctrl-V      2      0        22
  5538. Ctrl-W      2      0        23
  5539. Ctrl-X      2      0        24
  5540. Ctrl-Y      2      0        25
  5541. Ctrl-Z      2      0        26
  5542. Ctrl-[      2      0        27
  5543. Ctrl-\      2      0        28
  5544. Ctrl-]      2      0        29
  5545. Ctrl-6      2      0        30
  5546. Ctrl--      2      0        31
  5547.  
  5548.                               Appendix B
  5549.                         Keyboard Element Codes
  5550.  
  5551.                   +--------------------------------+
  5552.                   |                                |
  5553.                   |   This appendix lists the ele  |
  5554.                   |   ment codes for all the key   |
  5555.                   |  combinations on the key board |
  5556.                   |   as they are interpreted by   |
  5557.                   |      the function EditSt.      |
  5558.                   |                                |
  5559.                   | Thank-you for supporting the   |
  5560.                   |        FlashPac Library        |
  5561.                   |                                |
  5562.                   +--------------------------------+
  5563.  
  5564.  
  5565. The EditSt function will return all key information as an integer 
  5566. representing an element code.
  5567.  
  5568. An array of 32 bytes is required for this table.
  5569.  
  5570.     char TSet[32];
  5571.  
  5572. The unit or element number in the set defines which key or key 
  5573. combination was pressed.  This table was created for use as the 
  5574. Terminating Character Set with the procedures EditSt.
  5575.  
  5576. Use the value in the column ELEMENT NUMBER to determine the element 
  5577. number or bit number for a terminating key.
  5578.  
  5579.  
  5580.                       Element
  5581. Key code    AH   AL   Number
  5582. --------    ---  ---  -------
  5583. Ctrl-Break  0    0     0
  5584. Esc         1    27    1
  5585. not used               2
  5586. Ctrl-2      3    0     3
  5587. not used               4
  5588. not used               5
  5589. not used               6
  5590. not used               7
  5591. BackSp      14   8     8
  5592. Tab         15   9     9
  5593. Ctrl-Enter  28   10    10
  5594. not used               11
  5595. not used               12
  5596. Enter       28   13    13
  5597. Ctrl-BS     14   127   14
  5598. Shft-Tab    15   0     15
  5599. Alt-Q       16   0     16
  5600. Alt-W       17   0     17
  5601. Alt-E       18   0     18
  5602. Alt-R       19   0     19
  5603. Alt-T       20   0     20
  5604. Alt-Y       21   0     21
  5605. Alt-U       22   0     22
  5606. Alt-I       23   0     23
  5607. Alt-O       24   0     24
  5608. Alt-P       25   0     25
  5609. not used               26
  5610. not used               27
  5611. not used               28
  5612. not used               29
  5613. Alt-A       30   0     30
  5614. Alt-S       31   0     31
  5615. Alt-D       32   0     32
  5616. Alt-F       33   0     33
  5617. Alt-G       34   0     34
  5618. Alt-H       35   0     35
  5619. Alt-J       36   0     36
  5620. Alt-K       37   0     37
  5621. Alt-L       38   0     38
  5622. not used               39
  5623. not used               40
  5624. not used               41
  5625. not used               42
  5626. not used               43
  5627. Alt-Z       44   0     44
  5628. Alt-X       45   0     45
  5629. Alt-C       46   0     46
  5630. Alt-V       47   0     47
  5631. Alt-B       48   0     48
  5632. Alt-N       49   0     49
  5633. Alt-M       50   0     50
  5634. not used               51
  5635. not used               52
  5636. not used               53
  5637. not used               54
  5638. not used               55
  5639. not used               56
  5640. not used               57
  5641. not used               58
  5642. F1          59   0     59
  5643. F2          60   0     60
  5644. F3          61   0     61
  5645. F4          62   0     62
  5646. F5          63   0     63
  5647. F6          64   0     64
  5648. F7          65   0     65
  5649. F8          66   0     66
  5650. F9          67   0     67
  5651. F10         68   0     68
  5652. not used               69
  5653. not used               70
  5654. Home        71   0     71
  5655. UArr        72   0     72
  5656. PgUp        73   0     73
  5657. not used               74
  5658. LArr        75   0     75
  5659. not used               76
  5660. RArr        77   0     77
  5661. not used               78
  5662. End         79   0     79
  5663. DArr        80   0     80
  5664. PgDn        81   0     81
  5665. Ins         82   0     82
  5666. Del         83   0     83
  5667. Shft-F1     84   0     84
  5668. Shft-F2     85   0     85
  5669. Shft-F3     86   0     86
  5670. Shft-F4     87   0     87
  5671. Shft-F5     88   0     88
  5672. Shft-F6     89   0     89
  5673. Shft-F7     90   0     90
  5674. Shft-F8     91   0     91
  5675. Shft-F9     92   0     92
  5676. Shft-F10    93   0     93
  5677. Ctrl-F1     94   0     94
  5678. Ctrl-F2     95   0     95
  5679. Ctrl-F3     96   0     96
  5680. Ctrl-F4     97   0     97
  5681. Ctrl-F5     98   0     98
  5682. Ctrl-F6     99   0     99
  5683. Ctrl-F7     100  0     100
  5684. Ctrl-F8     101  0     101
  5685. Ctrl-F9     102  0     102
  5686. Ctrl-F10    103  0     103
  5687. Alt-F1      104  0     104
  5688. Alt-F2      105  0     105
  5689. Alt-F3      106  0     106
  5690. Alt-F4      107  0     107
  5691. Alt-F5      108  0     108
  5692. Alt-F6      109  0     109
  5693. Alt-F7      110  0     110
  5694. Alt-F8      111  0     111
  5695. Alt-F9      112  0     112
  5696. Alt-F10     113  0     113
  5697. not used               114
  5698. Ctrl-LArr   115  0     115
  5699. Ctrl-RArr   116  0     116
  5700. Ctrl-End    117  0     117
  5701. Ctrl-PgDn   118  0     118
  5702. Ctrl-Home   119  0     119
  5703. Alt-1       120  0     120
  5704. Alt-2       121  0     121
  5705. Alt-3       122  0     122
  5706. Alt-4       123  0     123
  5707. Alt-5       124  0     124
  5708. Alt-6       125  0     125
  5709. Alt-7       126  0     126
  5710. Alt-8       127  0     127
  5711. Alt-9       128  0     128
  5712. Alt-0       129  0     129
  5713. Alt--       130  0     130
  5714. Alt-=       131  0     131
  5715. Ctrl-PgUp   132  0     132
  5716.  
  5717.  
  5718.            AL+        Element
  5719. Key code   132   AL   Number
  5720. --------   ---   ---  -------
  5721. Ctrl-A     133   1     133
  5722. Ctrl-B     134   2     134
  5723. Ctrl-C     135   3     135
  5724. Ctrl-D     136   4     136
  5725. Ctrl-E     137   5     137
  5726. Ctrl-F     138   6     138
  5727. Ctrl-G     139   7     139
  5728. Ctrl-H     140   8     140
  5729. Ctrl-I     141   9     141
  5730. Ctrl-J     142   10    142
  5731. Ctrl-K     143   11    143
  5732. Ctrl-L     144   12    144
  5733. Ctrl-M     145   13    145
  5734. Ctrl-N     146   14    146
  5735. Ctrl-O     147   15    147
  5736. Ctrl-P     148   16    148
  5737. Ctrl-Q     149   17    149
  5738. Ctrl-R     150   18    150
  5739. Ctrl-S     151   19    151
  5740. Ctrl-T     152   20    152
  5741. Ctrl-U     153   21    153
  5742. Ctrl-V     154   22    154
  5743. Ctrl-W     155   23    155
  5744. Ctrl-X     156   24    156
  5745. Ctrl-Y     157   25    157
  5746. Ctrl-Z     158   26    158
  5747. Ctrl-[     159   27    159
  5748. Ctrl-\     160   28    160
  5749. Ctrl-]     161   29    161
  5750. Ctrl-6     162   30    162
  5751. Ctrl--     163   31    163
  5752. (space)    164   32    164
  5753. !          165   33    165
  5754. "          166   34    166
  5755. #          167   35    167
  5756. $          168   36    168
  5757. %          169   37    169
  5758. &          170   38    170
  5759. '          171   39    171
  5760. (          172   40    172
  5761. )          173   41    173
  5762. *          174   42    174
  5763. +          175   43    175
  5764. ,          176   44    176
  5765. -          177   45    177
  5766. /          179   47    179
  5767. 0          180   48    180
  5768. 1          181   49    181
  5769. 2          182   50    182
  5770. 3          183   51    183
  5771. 4          184   52    184
  5772. 5          185   53    185
  5773. 6          186   54    186
  5774. 7          187   55    187
  5775. 8          188   56    188
  5776. 9          189   57    189
  5777. :          190   58    190
  5778. ;          191   59    191
  5779. <          192   60    192
  5780. =          193   61    193
  5781. >          194   62    194
  5782. ?          195   63    195
  5783. @          196   64    196
  5784. A          197   65    197
  5785. B          198   66    198
  5786. C          199   67    199
  5787. D          200   68    200
  5788. E          201   69    201
  5789. F          202   70    202
  5790. G          203   71    203
  5791. H          204   72    204
  5792. I          205   73    205
  5793. J          206   74    206
  5794. K          207   75    207
  5795. L          208   76    208
  5796. M          209   77    209
  5797. N          210   78    210
  5798. O          211   79    211
  5799. P          212   80    212
  5800. Q          213   81    213
  5801. R          214   82    214
  5802. S          215   83    215
  5803. T          216   84    216
  5804. U          217   85    217
  5805. V          218   86    218
  5806. '          219   87    219
  5807. X          220   88    220
  5808. Y          221   89    221
  5809. Z          222   90    222
  5810. [          223   91    223
  5811. \          224   92    224
  5812. ]          225   93    225
  5813. _          227   95    227
  5814. `          228   96    228
  5815. a          229   97    229
  5816. b          230   98    230
  5817. c          231   99    231
  5818. d          232   100   232
  5819. e          233   101   233
  5820. f          234   102   234
  5821. g          235   103   235
  5822. h          236   104   236
  5823. i          237   105   237
  5824. j          238   106   238
  5825. k          239   107   239
  5826. l          240   108   240
  5827. m          241   109   241
  5828. n          242   110   242
  5829. o          243   111   243
  5830. p          244   112   244
  5831. q          245   113   245
  5832. r          246   114   246
  5833. s          247   115   247
  5834. t          248   116   248
  5835. u          249   117   249
  5836. v          250   118   250
  5837. w          251   119   251
  5838. x          252   120   252
  5839. y          253   121   253
  5840. z          254   122   254
  5841. {          255   123   255
  5842. |          256   124   256
  5843. }          257   125   257
  5844. ~          258   126   258
  5845.           259   127   259
  5846.  
  5847.                               Appendix C
  5848.                             Keyboard Codes
  5849.  
  5850.                   +--------------------------------+
  5851.                   |                                |
  5852.                   |   This appendix lists the key  |
  5853.                   |  board codes that are returned |
  5854.                   |   in the AH and AL registers   |
  5855.                   |    when the BIOS is used to    |
  5856.                   |   retrieve the next keyboard   |
  5857.                   |    code stored in the system   |
  5858.                   |        keyboard buffer.        |
  5859.                   |                                |
  5860.                   | Thank-you for supporting the   |
  5861.                   |        FlashPac Library        |
  5862.                   |                                |
  5863.                   +--------------------------------+
  5864.  
  5865. This appendix lists the keyboard codes that are returned by the 
  5866. computer system when a key or key combination is pressed.  The column 
  5867. headings AH and AL refer to the hi and lo registers within the AX 
  5868. register.  These are the actual values returned by
  5869. the BIOS interrupt 16H in assemlby language.
  5870.  
  5871. Key 
  5872. Pressed      AH    AL
  5873. -------      ---   ---
  5874. (space)      57    32
  5875. !            2     33
  5876. "            40    34
  5877. #            4     35
  5878. $            5     36
  5879. %            6     37
  5880. &            8     38
  5881. '            40    39
  5882. (            10    40
  5883. )            11    41
  5884. *            9     42
  5885. +            13    43
  5886. ,            51    44
  5887. -            12    45
  5888. /            53    47
  5889. 0            11    48
  5890. 1            2     49
  5891. 2            3     50
  5892. 3            4     51
  5893. 4            5     52
  5894. 5            6     53
  5895. 6            7     54
  5896. 7            8     55
  5897. 8            9     56
  5898. 9            10    57
  5899. :            39    58
  5900. ;            39    59
  5901. <            51    60
  5902. =            13    61
  5903. >            52    62
  5904. ?            53    63
  5905. @            3     64
  5906. A            30    65
  5907. B            48    66
  5908. C            46    67
  5909. D            32    68
  5910. E            18    69
  5911. F            33    70
  5912. G            34    71
  5913. H            35    72
  5914. I            23    73
  5915. J            36    74
  5916. K            37    75
  5917. L            38    76
  5918. M            50    77
  5919. N            49    78
  5920. O            24    79
  5921. P            25    80
  5922. Q            26    81
  5923. R            19    82
  5924. S            31    83
  5925. T            20    84
  5926. U            22    85
  5927. V            47    86
  5928. W            17    87
  5929. X            48    88
  5930. Y            21    89
  5931. Z            44    90
  5932. [            26    91
  5933. \            43    92
  5934. ]            27    93
  5935. ^            7     94
  5936. _            12    95
  5937. `            41    96
  5938. a            30    97
  5939. b            48    98
  5940. c            46    99
  5941. d            32    100
  5942. e            18    101
  5943. f            33    102
  5944. g            34    103
  5945. h            35    104
  5946. i            23    105
  5947. j            36    106
  5948. k            37    107
  5949. l            38    108
  5950. m            50    109
  5951. n            49    110
  5952. o            24    111
  5953. p            25    112
  5954. q            16    113
  5955. r            19    114
  5956. s            31    115
  5957. t            20    116
  5958. u            22    117
  5959. v            47    118
  5960. w            17    119
  5961. x            48    120
  5962. y            21    121
  5963. z            44    122
  5964. {            26    123
  5965. |            43    124
  5966. }            27    125
  5967. ~            41    126
  5968. Ctrl-2       3     0
  5969. BackSp       14    8
  5970. Tab          15    9
  5971. Ctrl-Enter   28    10
  5972. Enter        28    13
  5973. Shft-Tab     15    0
  5974. Alt-Q        16    0
  5975. Alt-W        17    0
  5976. Alt-E        18    0
  5977. Alt-R        19    0
  5978. Alt-T        20    0
  5979. Alt-Y        21    0
  5980. Alt-U        22    0
  5981. Alt-I        23    0
  5982. Alt-O        24    0
  5983. Alt-P        25    0
  5984. Esc          1     27
  5985. Alt-A        30    0
  5986. Alt-S        31    0
  5987. Alt-D        32    0
  5988. Alt-F        33    0
  5989. Alt-G        34    0
  5990. Alt-H        35    0
  5991. Alt-J        36    0
  5992. Alt-K        37    0
  5993. Alt-L        38    0
  5994. Alt-Z        44    0
  5995. Alt-X        45    0
  5996. Alt-C        46    0
  5997. Alt-V        47    0
  5998. Alt-B        48    0
  5999. Alt-N        49    0
  6000. Alt-M        50    0
  6001. F1           59    0
  6002. F2           60    0
  6003. F3           61    0
  6004. F4           62    0
  6005. F5           63    0
  6006. F6           64    0
  6007. F7           65    0
  6008. F8           66    0
  6009. F9           67    0
  6010. F10          68    0
  6011. Home         71    0
  6012. UArr         72    0
  6013. PgUp         73    0
  6014. LArr         75    0
  6015. RArr         77    0
  6016. End          79    0
  6017. DArr         80    0
  6018. PgDn         81    0
  6019. Ins          82    0
  6020. Del          83    0
  6021. Shft-F1      84    0
  6022. Shft-F2      85    0
  6023. Shft-F3      86    0
  6024. Shft-F4      87    0
  6025. Shft-F5      88    0
  6026. Shft-F6      89    0
  6027. Shft-F7      90    0
  6028. Shft-F8      91    0
  6029. Shft-F9      92    0
  6030. Shft-F10     93    0
  6031. Ctrl-F1      94    0
  6032. Ctrl-F2      95    0
  6033. Ctrl-F3      96    0
  6034. Ctrl-F4      97    0
  6035. Ctrl-F5      98    0
  6036. Ctrl-F6      99    0
  6037. Ctrl-F7      100   0
  6038. Ctrl-F8      101   0
  6039. Ctrl-F9      102   0
  6040. Ctrl-F10     103   0
  6041. Alt-F1       104   0
  6042. Alt-F2       105   0
  6043. Alt-F3       106   0
  6044. Alt-F4       107   0
  6045. Alt-F5       108   0
  6046. Alt-F6       109   0
  6047. Alt-F7       110   0
  6048. Alt-F8       111   0
  6049. Alt-F9       112   0
  6050. Alt-F10      113   0
  6051. Ctrl-LArr    115   0
  6052. Ctrl-RArr    116   0
  6053. Ctrl-End     117   0
  6054. Ctrl-PgDn    118   0
  6055. Ctrl-Home    119   0
  6056. Alt-1        120   0
  6057. Alt-2        121   0
  6058. Alt-3        122   0
  6059. Alt-4        123   0
  6060. Alt-5        124   0
  6061. Alt-6        125   0
  6062. Alt-7        126   0
  6063. Alt-8        127   0
  6064. Alt-9        128   0
  6065. Alt-0        129   0
  6066. Alt--        130   0
  6067. Alt-=        131   0
  6068. Ctrl-PgUp    132   0
  6069. Ctrl-A       30    1
  6070. Ctrl-B       48    2
  6071. Ctrl-C       46    3
  6072. Ctrl-D       32    4
  6073. Ctrl-E       18    5
  6074. Ctrl-F       33    6
  6075. Ctrl-G       34    7
  6076. Ctrl-H       35    8
  6077. Ctrl-I       23    9
  6078. Ctrl-J       36    10
  6079. Ctrl-K       37    11
  6080. Ctrl-L       38    12
  6081. Ctrl-M       50    13
  6082. Ctrl-N       49    14
  6083. Ctrl-O       24    15
  6084. Ctrl-P       25    16
  6085. Ctrl-Q       16    17
  6086. Ctrl-R       19    18
  6087. Ctrl-S       31    19
  6088. Ctrl-T       20    20
  6089. Ctrl-U       22    21
  6090. Ctrl-V       47    22
  6091. Ctrl-W       17    23
  6092. Ctrl-X       45    24
  6093. Ctrl-Y       21    25
  6094. Ctrl-Z       44    26
  6095. Ctrl-[       26    27
  6096. Ctrl-\       43    28
  6097. Ctrl-]       27    29
  6098. Ctrl-6       7     30
  6099. Ctrl--       12    31
  6100. Ctrl-BS      14    127
  6101. Ctrl-Break   0     0
  6102.  
  6103.                               Appendix D
  6104.                           Keyboard Scan Codes
  6105.  
  6106.                   +--------------------------------+
  6107.                   |                                |
  6108.                   |                                |
  6109.                   | Thank-you for supporting the   |
  6110.                   |        FlashPac Library        |
  6111.                   |                                |
  6112.                   +--------------------------------+
  6113.  
  6114.  
  6115.  
  6116. FUNCTION KEYS     NUMERIC KEYPAD
  6117.  
  6118. Key   Scan Code   Key   Scan Code
  6119. ----  ---------   ----  ---------
  6120. F1       59        7       71
  6121. F2       60        8       72
  6122. F3       61        9       73
  6123. F4       62        -       74
  6124. F5       63        4       75
  6125. F6       64        5       76
  6126. F7       65        6       77
  6127. F8       66        +       78
  6128. F9       67        1       79
  6129. F10      68        2       80
  6130.                    3       81
  6131.                    0       82
  6132.                    .       83
  6133.  
  6134.  
  6135. CONTROL KEYS
  6136.  
  6137. Key        Scan Code
  6138. ------     ---------
  6139. Esc           1
  6140. Ctrl          29
  6141. Backspace     14
  6142. Left Shft     42
  6143. Num Lock      69
  6144. Right Shft    54
  6145. Scroll Lock   70
  6146. Alt           56
  6147. Tab           15
  6148. Caps Lock     58
  6149. Enter         28
  6150.  
  6151.  
  6152. LETTER, NUMBER, AND PUNCTUATION KEYS
  6153.  
  6154. Key   Scan Code
  6155. ----  ---------
  6156. 1        2
  6157. 2        3
  6158. 3        4
  6159. 4        5
  6160. 5        6
  6161. 6        7
  6162. 7        8
  6163. 8        9
  6164. 9        10
  6165. 0        11
  6166. -        12
  6167. =        13
  6168. Q        16
  6169. W        17
  6170. E        18
  6171. R        19
  6172. T        20
  6173. Y        21
  6174. U        22
  6175. I        23
  6176. O        24
  6177. P        25
  6178. [        26
  6179. ]        27
  6180. A        30
  6181. S        31
  6182. D        32
  6183. F        33
  6184. G        34
  6185. H        35
  6186. J        36
  6187. K        37
  6188. L        38
  6189. ;        39
  6190. '        40
  6191. `        41
  6192. \        43
  6193. Z        44
  6194. X        45
  6195. C        46
  6196. V        47
  6197. B        48
  6198. N        49
  6199. M        50
  6200. ,        51
  6201. .        52
  6202. /        53
  6203. (PrtSc)  55
  6204.